Documentation ¶
Index ¶
- func Call(ctx context.Context, fn func())
- func CallSafe(ctx context.Context, fn func())
- func CtxWithLogstash(ctx context.Context, logstashAddr string, appName string) context.Context
- func Go(ctx context.Context, fn func())
- func GoSafe(ctx context.Context, fn func())
- func IsOnInsecureDebug(ctx context.Context) bool
- func NewHookAdapter(l *logrus.Logger, h logrus.Hook) logger.Hook
- func OnInsecureDebug(ctx context.Context) context.Context
- func PanicIfNotNil(ctx context.Context, r any)
- func ParseSecretsFrom(obj any) []string
- func ParseStringsFrom(obj any) []string
- func ReportPanicIfNotNil(ctx context.Context, r any) bool
- func WithSecretsProvider(ctx context.Context, secretsProvider SecretsProvider) context.Context
- type ErrorMonitorLoggerHook
- func (h *ErrorMonitorLoggerHook) ProcessInput(traceIDs belt.TraceIDs, level loggertypes.Level, args ...any) loggertypes.PreHookResult
- func (h *ErrorMonitorLoggerHook) ProcessInputFields(traceIDs belt.TraceIDs, level loggertypes.Level, message string, ...) loggertypes.PreHookResult
- func (h *ErrorMonitorLoggerHook) ProcessInputf(traceIDs belt.TraceIDs, level loggertypes.Level, format string, args ...any) loggertypes.PreHookResult
- type ErrorMonitorMessage
- type Flusher
- type FlusherDeadlined
- type FlusherDeadlinedErr
- type FlusherErr
- type HookAdapter
- type LogLevelFilterT
- func (h *LogLevelFilterT) GetLevel() loggertypes.Level
- func (h *LogLevelFilterT) ProcessInput(traceIDs belt.TraceIDs, level loggertypes.Level, args ...any) loggertypes.PreHookResult
- func (h *LogLevelFilterT) ProcessInputFields(traceIDs belt.TraceIDs, level loggertypes.Level, message string, ...) loggertypes.PreHookResult
- func (h *LogLevelFilterT) ProcessInputf(traceIDs belt.TraceIDs, level loggertypes.Level, format string, args ...any) loggertypes.PreHookResult
- func (h *LogLevelFilterT) SetLevel(level loggertypes.Level)
- type RemoveInsecureDebugFilter
- type SecretValuesFilter
- func (sf *SecretValuesFilter) ProcessInput(_ belt.TraceIDs, _ logger.Level, args ...any) loggertypes.PreHookResult
- func (sf *SecretValuesFilter) ProcessInputFields(_ belt.TraceIDs, _ logger.Level, message string, fields field.AbstractFields) loggertypes.PreHookResult
- func (sf *SecretValuesFilter) ProcessInputf(_ belt.TraceIDs, _ logger.Level, format string, args ...any) loggertypes.PreHookResult
- type SecretsProvider
- type SecretsStaticProvider
- type StructFieldSecretsFilter
- func (StructFieldSecretsFilter) ProcessInput(_ belt.TraceIDs, _ logger.Level, args ...any) loggertypes.PreHookResult
- func (StructFieldSecretsFilter) ProcessInputFields(_ belt.TraceIDs, _ logger.Level, message string, fields field.AbstractFields) loggertypes.PreHookResult
- func (StructFieldSecretsFilter) ProcessInputf(_ belt.TraceIDs, _ logger.Level, format string, args ...any) loggertypes.PreHookResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CtxWithLogstash ¶
func IsOnInsecureDebug ¶
func PanicIfNotNil ¶
func ParseSecretsFrom ¶
func ParseStringsFrom ¶
func WithSecretsProvider ¶
func WithSecretsProvider(ctx context.Context, secretsProvider SecretsProvider) context.Context
Types ¶
type ErrorMonitorLoggerHook ¶
type ErrorMonitorLoggerHook struct { ErrorMonitor errmontypes.ErrorMonitor SendChan chan ErrorMonitorMessage }
func NewErrorMonitorLoggerHook ¶
func NewErrorMonitorLoggerHook( errorMonitor errmon.ErrorMonitor, ) *ErrorMonitorLoggerHook
func (*ErrorMonitorLoggerHook) ProcessInput ¶
func (h *ErrorMonitorLoggerHook) ProcessInput( traceIDs belt.TraceIDs, level loggertypes.Level, args ...any, ) loggertypes.PreHookResult
func (*ErrorMonitorLoggerHook) ProcessInputFields ¶
func (h *ErrorMonitorLoggerHook) ProcessInputFields( traceIDs belt.TraceIDs, level loggertypes.Level, message string, fields field.AbstractFields, ) loggertypes.PreHookResult
func (*ErrorMonitorLoggerHook) ProcessInputf ¶
func (h *ErrorMonitorLoggerHook) ProcessInputf( traceIDs belt.TraceIDs, level loggertypes.Level, format string, args ...any, ) loggertypes.PreHookResult
type ErrorMonitorMessage ¶
type ErrorMonitorMessage struct { Entry *loggertypes.Entry Goroutines []errmontypes.Goroutine CurrentGoroutineID int StackTrace xruntime.PCs }
type FlusherDeadlined ¶
type FlusherDeadlinedErr ¶
type FlusherErr ¶
type FlusherErr interface {
Flush() error
}
type HookAdapter ¶
func (*HookAdapter) Flush ¶
func (h *HookAdapter) Flush()
func (*HookAdapter) ProcessLogEntry ¶
func (h *HookAdapter) ProcessLogEntry(entry *logger.Entry) bool
type LogLevelFilterT ¶
type LogLevelFilterT struct { Locker xsync.Mutex Level loggertypes.Level }
var LogLevelFilter LogLevelFilterT
func (*LogLevelFilterT) GetLevel ¶
func (h *LogLevelFilterT) GetLevel() loggertypes.Level
func (*LogLevelFilterT) ProcessInput ¶
func (h *LogLevelFilterT) ProcessInput( traceIDs belt.TraceIDs, level loggertypes.Level, args ...any, ) loggertypes.PreHookResult
func (*LogLevelFilterT) ProcessInputFields ¶
func (h *LogLevelFilterT) ProcessInputFields( traceIDs belt.TraceIDs, level loggertypes.Level, message string, fields field.AbstractFields, ) loggertypes.PreHookResult
func (*LogLevelFilterT) ProcessInputf ¶
func (h *LogLevelFilterT) ProcessInputf( traceIDs belt.TraceIDs, level loggertypes.Level, format string, args ...any, ) loggertypes.PreHookResult
func (*LogLevelFilterT) SetLevel ¶
func (h *LogLevelFilterT) SetLevel( level loggertypes.Level, )
type RemoveInsecureDebugFilter ¶
type RemoveInsecureDebugFilter struct{}
func NewRemoveInsecureDebugFilter ¶
func NewRemoveInsecureDebugFilter() *RemoveInsecureDebugFilter
func (*RemoveInsecureDebugFilter) Flush ¶
func (f *RemoveInsecureDebugFilter) Flush()
func (*RemoveInsecureDebugFilter) ProcessLogEntry ¶
func (f *RemoveInsecureDebugFilter) ProcessLogEntry(entry *logger.Entry) bool
type SecretValuesFilter ¶
type SecretValuesFilter struct {
SecretsProvider SecretsProvider
}
func NewSecretValuesFilter ¶
func NewSecretValuesFilter(sp SecretsProvider) *SecretValuesFilter
func (*SecretValuesFilter) ProcessInput ¶
func (sf *SecretValuesFilter) ProcessInput( _ belt.TraceIDs, _ logger.Level, args ...any, ) loggertypes.PreHookResult
func (*SecretValuesFilter) ProcessInputFields ¶
func (sf *SecretValuesFilter) ProcessInputFields( _ belt.TraceIDs, _ logger.Level, message string, fields field.AbstractFields, ) loggertypes.PreHookResult
func (*SecretValuesFilter) ProcessInputf ¶
func (sf *SecretValuesFilter) ProcessInputf( _ belt.TraceIDs, _ logger.Level, format string, args ...any, ) loggertypes.PreHookResult
type SecretsProvider ¶
type SecretsProvider interface {
SecretWords() []string
}
func SecretsProviderFromCtx ¶
func SecretsProviderFromCtx(ctx context.Context) SecretsProvider
type SecretsStaticProvider ¶
func NewStaticSecretsProvider ¶
func NewStaticSecretsProvider() *SecretsStaticProvider
func (*SecretsStaticProvider) ParseSecretsFrom ¶
func (sp *SecretsStaticProvider) ParseSecretsFrom(obj any)
func (*SecretsStaticProvider) SecretWords ¶
func (sp *SecretsStaticProvider) SecretWords() []string
func (*SecretsStaticProvider) SetSecretWords ¶
func (sp *SecretsStaticProvider) SetSecretWords(v []string)
type StructFieldSecretsFilter ¶
type StructFieldSecretsFilter struct{}
func (StructFieldSecretsFilter) ProcessInput ¶
func (StructFieldSecretsFilter) ProcessInput( _ belt.TraceIDs, _ logger.Level, args ...any, ) loggertypes.PreHookResult
func (StructFieldSecretsFilter) ProcessInputFields ¶
func (StructFieldSecretsFilter) ProcessInputFields( _ belt.TraceIDs, _ logger.Level, message string, fields field.AbstractFields, ) loggertypes.PreHookResult
func (StructFieldSecretsFilter) ProcessInputf ¶
func (StructFieldSecretsFilter) ProcessInputf( _ belt.TraceIDs, _ logger.Level, format string, args ...any, ) loggertypes.PreHookResult
Click to show internal directories.
Click to hide internal directories.