Adding the debug bar logic in the server (#22410)
* Adding debugbar layer * Adding sql debugbar info * Make duration consistent across the debugbar lines * Adding the debugbar/systeminfo endpoint * Adding logs to the debugbar * Improve the debugbar logger fields info * Improving the debug bar architecture * Allow to enable/disable debugbar in the backend * Exposing the Debug Bar enable in the client config * Adding more system information to the debugbar * Adding params info to the store layer * Organizing a bit the debugbar code in the server and adding some extra data to the system info api * Adding debugbar email traces * Changing the socket event name to 'debugbar' * Adding explain support for the debugbar * Adding missed file * Omitting data related to the debugbar itself * Removing unneeded functions * Avoid arbitrary execution in explain api * Moving debugbar inside the platform directory * Replacing debugbar logger with a new logger Target * Removed uneeded changes * Fixing some linter errors * Adding a debugbar log level to use it later for log events strictly related to the debug bar * Fixing linter errors * Fixing tests * Adding i18n strings
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ebb160b081
Коммит
280bc7f97e
@@ -47,6 +47,9 @@ var (
|
||||
LvlSharedChannelServiceMessagesInbound = Level{ID: 203, Name: "SharedChannelServiceMsgInbound"}
|
||||
LvlSharedChannelServiceMessagesOutbound = Level{ID: 204, Name: "SharedChannelServiceMsgOutbound"}
|
||||
|
||||
// DebugBar
|
||||
LvlDebugBar = Level{ID: 300, Name: "DebugBar"}
|
||||
|
||||
// Focalboard
|
||||
LvlFBTelemetry = Level{ID: 9000, Name: "telemetry"}
|
||||
LvlFBMetrics = Level{ID: 9001, Name: "metrics"}
|
||||
|
||||
@@ -48,6 +48,8 @@ type Field = logr.Field
|
||||
type Level = logr.Level
|
||||
type Option = logr.Option
|
||||
type Target = logr.Target
|
||||
type Filter = logr.Filter
|
||||
type Formatter = logr.Formatter
|
||||
type TargetInfo = logr.TargetInfo
|
||||
type LogRec = logr.LogRec
|
||||
type LogCloner = logr.LogCloner
|
||||
@@ -178,6 +180,11 @@ func NewLogger(options ...Option) (*Logger, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
// AddTarget adds a new logr.Target to the Logger object.
|
||||
func (l *Logger) AddTarget(target Target, name string, filter Filter, formatter Formatter, maxQueueSize int) error {
|
||||
return l.log.Logr().AddTarget(target, name, filter, formatter, maxQueueSize)
|
||||
}
|
||||
|
||||
// Configure provides a new configuration for this logger.
|
||||
// Zero or more sources of config can be provided:
|
||||
//
|
||||
|
||||
Ссылка в новой задаче
Block a user