Documentation ¶
Index ¶
- func AppendFields(f Fields, fields ...Fields)
- type Fields
- type Level
- type Logger
- type LoggerBase
- type ProxyLogger
- func (p *ProxyLogger) CheckFatalStack(logger Logger, message ...string) bool
- func (p *ProxyLogger) Debug(message string, fields ...Fields)
- func (p *ProxyLogger) DumpRequests() bool
- func (p *ProxyLogger) Error(message string, err error, fields ...Fields) error
- func (p *ProxyLogger) ErrorMessage(message string, fields ...Fields)
- func (p *ProxyLogger) ErrorNative(err error, fields ...Fields)
- func (p *ProxyLogger) ErrorRaw(data ...interface{})
- func (p *ProxyLogger) Fatal(message string, err error, fields ...Fields) error
- func (p *ProxyLogger) GetLevel() Level
- func (p *ProxyLogger) Info(message string, fields ...Fields)
- func (p *ProxyLogger) Log(level Level, message string, fields ...Fields)
- func (p *ProxyLogger) Native() interface{}
- func (p *ProxyLogger) NextLogger() Logger
- func (p *ProxyLogger) PushFatalStack(message string, err error, fields ...Fields) error
- func (p *ProxyLogger) Reset()
- func (p *ProxyLogger) SetLevel(level Level)
- func (p *ProxyLogger) SetNextLogger(logger Logger)
- func (p *ProxyLogger) SetStaticField(name string, value interface{})
- func (p *ProxyLogger) StaticFields() Fields
- func (p *ProxyLogger) Trace(message string, fields ...Fields)
- func (p *ProxyLogger) UnsetStaticField(name string)
- func (p *ProxyLogger) Warn(message string, fields ...Fields)
- type TeeLogger
- func (t *TeeLogger) CheckFatalStack(logger Logger, message ...string) bool
- func (t *TeeLogger) Debug(message string, fields ...Fields)
- func (t *TeeLogger) DumpRequests() bool
- func (t *TeeLogger) Error(message string, err error, fields ...Fields) error
- func (t *TeeLogger) ErrorMessage(message string, fields ...Fields)
- func (t *TeeLogger) ErrorNative(err error, fields ...Fields)
- func (t *TeeLogger) ErrorRaw(data ...interface{})
- func (t *TeeLogger) Fatal(message string, err error, fields ...Fields) error
- func (t *TeeLogger) GetLevel() Level
- func (t *TeeLogger) Info(message string, fields ...Fields)
- func (t *TeeLogger) Log(level Level, message string, fields ...Fields)
- func (t *TeeLogger) Native() interface{}
- func (t *TeeLogger) PushFatalStack(message string, err error, fields ...Fields) error
- func (t *TeeLogger) SetLevel(level Level)
- func (t *TeeLogger) Trace(message string, fields ...Fields)
- func (t *TeeLogger) Warn(message string, fields ...Fields)
- type WithLogger
- type WithLoggerBase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendFields ¶
Types ¶
type Level ¶
type Level uint32
const ( // PanicLevel level, highest level of severity. Logs and then calls panic with the // message passed to Debug, Info, ... PanicLevel Level = iota // FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the // logging level is set to Panic. FatalLevel // ErrorLevel level. Logs. Used for errors that should definitely be noted. // Commonly used for hooks to send errors to an error tracking service. ErrorLevel // WarnLevel level. Non-critical entries that deserve eyes. WarnLevel // InfoLevel level. General operational entries about what's going on inside the // application. InfoLevel // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel // TraceLevel level. Designates finer-grained informational events than the Debug. TraceLevel )
type Logger ¶
type Logger interface { Log(level Level, message string, fields ...Fields) Error(message string, err error, fields ...Fields) error ErrorNative(err error, fields ...Fields) ErrorMessage(message string, fields ...Fields) Warn(message string, fields ...Fields) Debug(message string, fields ...Fields) Info(message string, fields ...Fields) Trace(message string, fields ...Fields) Fatal(message string, err error, fields ...Fields) error ErrorRaw(...interface{}) Native() interface{} PushFatalStack(message string, err error, fields ...Fields) error CheckFatalStack(logger Logger, message ...string) bool DumpRequests() bool SetLevel(level Level) GetLevel() Level }
type LoggerBase ¶
type LoggerBase struct {
// contains filtered or unexported fields
}
func (*LoggerBase) CheckFatalStack ¶
func (l *LoggerBase) CheckFatalStack(logger Logger, message ...string) bool
func (*LoggerBase) Init ¶
func (l *LoggerBase) Init()
func (*LoggerBase) PushFatalStack ¶
func (l *LoggerBase) PushFatalStack(message string, err error, fields ...Fields) error
type ProxyLogger ¶
type ProxyLogger struct {
// contains filtered or unexported fields
}
func NewProxy ¶
func NewProxy(log Logger, fields ...Fields) *ProxyLogger
func (*ProxyLogger) CheckFatalStack ¶
func (p *ProxyLogger) CheckFatalStack(logger Logger, message ...string) bool
func (*ProxyLogger) Debug ¶
func (p *ProxyLogger) Debug(message string, fields ...Fields)
func (*ProxyLogger) DumpRequests ¶
func (p *ProxyLogger) DumpRequests() bool
func (*ProxyLogger) Error ¶
func (p *ProxyLogger) Error(message string, err error, fields ...Fields) error
func (*ProxyLogger) ErrorMessage ¶
func (p *ProxyLogger) ErrorMessage(message string, fields ...Fields)
func (*ProxyLogger) ErrorNative ¶
func (p *ProxyLogger) ErrorNative(err error, fields ...Fields)
func (*ProxyLogger) ErrorRaw ¶
func (p *ProxyLogger) ErrorRaw(data ...interface{})
func (*ProxyLogger) Fatal ¶
func (p *ProxyLogger) Fatal(message string, err error, fields ...Fields) error
func (*ProxyLogger) GetLevel ¶
func (p *ProxyLogger) GetLevel() Level
func (*ProxyLogger) Info ¶
func (p *ProxyLogger) Info(message string, fields ...Fields)
func (*ProxyLogger) Native ¶
func (p *ProxyLogger) Native() interface{}
func (*ProxyLogger) NextLogger ¶
func (p *ProxyLogger) NextLogger() Logger
func (*ProxyLogger) PushFatalStack ¶
func (p *ProxyLogger) PushFatalStack(message string, err error, fields ...Fields) error
func (*ProxyLogger) Reset ¶
func (p *ProxyLogger) Reset()
func (*ProxyLogger) SetLevel ¶
func (p *ProxyLogger) SetLevel(level Level)
func (*ProxyLogger) SetNextLogger ¶
func (p *ProxyLogger) SetNextLogger(logger Logger)
func (*ProxyLogger) SetStaticField ¶
func (p *ProxyLogger) SetStaticField(name string, value interface{})
func (*ProxyLogger) StaticFields ¶
func (p *ProxyLogger) StaticFields() Fields
func (*ProxyLogger) Trace ¶
func (p *ProxyLogger) Trace(message string, fields ...Fields)
func (*ProxyLogger) UnsetStaticField ¶
func (p *ProxyLogger) UnsetStaticField(name string)
func (*ProxyLogger) Warn ¶
func (p *ProxyLogger) Warn(message string, fields ...Fields)
type TeeLogger ¶
type TeeLogger struct {
// contains filtered or unexported fields
}
func (*TeeLogger) CheckFatalStack ¶
func (*TeeLogger) DumpRequests ¶
func (*TeeLogger) ErrorMessage ¶
func (*TeeLogger) ErrorNative ¶
func (*TeeLogger) PushFatalStack ¶
type WithLogger ¶
type WithLoggerBase ¶
type WithLoggerBase struct {
// contains filtered or unexported fields
}
func (*WithLoggerBase) Init ¶
func (w *WithLoggerBase) Init(logger Logger)
func (*WithLoggerBase) Logger ¶
func (w *WithLoggerBase) Logger() Logger
func (*WithLoggerBase) SetLogger ¶
func (w *WithLoggerBase) SetLogger(logger Logger)
Click to show internal directories.
Click to hide internal directories.