Documentation
¶
Index ¶
- Variables
- func AddHook(hook Hook)
- func AddHooks(hooks ...Hook)
- func AttachField(k string, v interface{})
- func AttachFields(kv Fields)
- func Debug(v ...interface{})
- func Debugf(s string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(s string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(s string, v ...interface{})
- func Info(v ...interface{})
- func Infof(s string, v ...interface{})
- func NewConsoleHook(configs ...*ConsoleHookConfig) *hook
- func NewFileHook(configs ...*FileHookConfig) *hook
- func Panic(v ...interface{})
- func Panicf(s string, v ...interface{})
- func SetLevel(level Level)
- func ToError(i interface{}) error
- func Warn(v ...interface{})
- func Warnf(s string, v ...interface{})
- type ConsoleHookConfig
- type Entry
- func (e *Entry) Caller(skip ...int) *Entry
- func (e *Entry) Debug(v ...interface{})
- func (e *Entry) Debugf(s string, v ...interface{})
- func (e *Entry) Error(v ...interface{})
- func (e *Entry) Errorf(s string, v ...interface{})
- func (e *Entry) Fatal(v ...interface{})
- func (e *Entry) Fatalf(s string, v ...interface{})
- func (e *Entry) Info(v ...interface{})
- func (e *Entry) Infof(s string, v ...interface{})
- func (e *Entry) Panic(v ...interface{})
- func (e *Entry) Panicf(s string, v ...interface{})
- func (e *Entry) Warn(v ...interface{})
- func (e *Entry) Warnf(s string, v ...interface{})
- func (e *Entry) WithContext(ctx context.Context) *Entry
- func (e *Entry) WithField(k string, v interface{}) *Entry
- func (e *Entry) WithFields(kv Fields) *Entry
- type Fields
- type FileHookConfig
- type Formatter
- type Hook
- type JSONFormatter
- type Level
- type LevelHooks
- type Logger
- func (l *Logger) AddHook(hook Hook)
- func (l *Logger) AddHooks(hooks ...Hook)
- func (l *Logger) AttachField(k string, v interface{})
- func (l *Logger) AttachFields(kv Fields)
- func (l *Logger) Caller(skip ...int) *Entry
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) Debugf(s string, v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) Errorf(s string, v ...interface{})
- func (l *Logger) Fatal(v ...interface{})
- func (l *Logger) Fatalf(s string, v ...interface{})
- func (l *Logger) GetLevel() Level
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Infof(s string, v ...interface{})
- func (l *Logger) Panic(v ...interface{})
- func (l *Logger) Panicf(s string, v ...interface{})
- func (l *Logger) ReplaceHooks(hooks ...Hook)
- func (l *Logger) SetExitFunc(f func(int))
- func (l *Logger) SetFormatter(formatter Formatter)
- func (l *Logger) SetLevel(level Level)
- func (l *Logger) SetOutput(output io.Writer)
- func (l *Logger) Warn(v ...interface{})
- func (l *Logger) Warnf(s string, v ...interface{})
- func (l *Logger) WithContext(ctx context.Context) *Entry
- func (l *Logger) WithField(k string, v interface{}) *Entry
- func (l *Logger) WithFields(kv Fields) *Entry
- type TextFormatter
Constants ¶
This section is empty.
Variables ¶
View Source
var AllLevels = []Level{ PanicLevel, FatalLevel, ErrorLevel, WarnLevel, InfoLevel, DebugLevel, }
Functions ¶
func AttachField ¶
func AttachField(k string, v interface{})
func AttachFields ¶
func AttachFields(kv Fields)
func NewConsoleHook ¶
func NewConsoleHook(configs ...*ConsoleHookConfig) *hook
func NewFileHook ¶
func NewFileHook(configs ...*FileHookConfig) *hook
Types ¶
type ConsoleHookConfig ¶
type ConsoleHookConfig struct {
Level Level
}
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
func WithContext ¶
func WithFields ¶
func (*Entry) WithFields ¶
type FileHookConfig ¶
type JSONFormatter ¶
type JSONFormatter = logrus.JSONFormatter
type Level ¶
type Level uint32
func ParseLevel ¶
func (Level) MarshalText ¶
func (*Level) UnmarshalText ¶
type LevelHooks ¶
type LevelHooks = logrus.LevelHooks
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func DefaultLogger ¶
func DefaultLogger() *Logger
func NewWithLevel ¶
func (*Logger) AttachField ¶
func (*Logger) AttachFields ¶
func (*Logger) ReplaceHooks ¶
func (*Logger) SetExitFunc ¶ added in v0.0.2
func (*Logger) SetFormatter ¶
func (*Logger) WithFields ¶
type TextFormatter ¶
type TextFormatter = logrus.TextFormatter
Click to show internal directories.
Click to hide internal directories.