Documentation ¶
Index ¶
- type CallerHook
- type Entry
- type Logger
- type LogrusEntry
- type LogrusLogger
- func (l *LogrusLogger) Debug() Entry
- func (l *LogrusLogger) Error() Entry
- func (l *LogrusLogger) Fatal() Entry
- func (l *LogrusLogger) Info() Entry
- func (l *LogrusLogger) Init() *logrus.Logger
- func (l *LogrusLogger) Panic() Entry
- func (l *LogrusLogger) SetLevel(level string) error
- func (l *LogrusLogger) Start() error
- func (l *LogrusLogger) Trace() Entry
- func (l *LogrusLogger) Warn() Entry
- type NullLogger
- type NullLoggerEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallerHook ¶
type CallerHook struct{}
func (*CallerHook) Levels ¶
func (h *CallerHook) Levels() []logrus.Level
type Entry ¶
type Entry interface { WithField(key string, value interface{}) Entry // WithString does the same thing as WithField, but is more efficient for // disabled log levels. (Because the value parameter doesn't escape.) WithString(key, value string) Entry WithFields(fields map[string]interface{}) Entry Logf(f string, args ...interface{}) }
type Logger ¶
type LogrusEntry ¶
type LogrusEntry struct {
// contains filtered or unexported fields
}
func (*LogrusEntry) Logf ¶
func (l *LogrusEntry) Logf(f string, args ...interface{})
func (*LogrusEntry) WithField ¶
func (l *LogrusEntry) WithField(key string, value interface{}) Entry
func (*LogrusEntry) WithFields ¶
func (l *LogrusEntry) WithFields(fields map[string]interface{}) Entry
func (*LogrusEntry) WithString ¶
func (l *LogrusEntry) WithString(key, value string) Entry
type LogrusLogger ¶
type LogrusLogger struct { LogFormatter string LogOutput string File struct { FileName string MaxSize int MaxBackups int Compress bool } // contains filtered or unexported fields }
LogrusLogger is a Logger implementation that sends all logs to stdout using the Logrus package to get nice formatting
func (*LogrusLogger) Debug ¶
func (l *LogrusLogger) Debug() Entry
func (*LogrusLogger) Error ¶
func (l *LogrusLogger) Error() Entry
func (*LogrusLogger) Fatal ¶
func (l *LogrusLogger) Fatal() Entry
func (*LogrusLogger) Info ¶
func (l *LogrusLogger) Info() Entry
func (*LogrusLogger) Init ¶
func (l *LogrusLogger) Init() *logrus.Logger
func (*LogrusLogger) Panic ¶
func (l *LogrusLogger) Panic() Entry
func (*LogrusLogger) SetLevel ¶
func (l *LogrusLogger) SetLevel(level string) error
func (*LogrusLogger) Start ¶
func (l *LogrusLogger) Start() error
func (*LogrusLogger) Trace ¶
func (l *LogrusLogger) Trace() Entry
func (*LogrusLogger) Warn ¶
func (l *LogrusLogger) Warn() Entry
type NullLogger ¶
type NullLogger struct {
Logger
}
func (*NullLogger) Debug ¶
func (n *NullLogger) Debug() Entry
func (*NullLogger) Error ¶
func (n *NullLogger) Error() Entry
func (*NullLogger) Fatal ¶
func (n *NullLogger) Fatal() Entry
func (*NullLogger) Info ¶
func (n *NullLogger) Info() Entry
func (*NullLogger) Init ¶
func (n *NullLogger) Init() *logrus.Logger
func (*NullLogger) Panic ¶
func (n *NullLogger) Panic() Entry
func (*NullLogger) SetLevel ¶
func (n *NullLogger) SetLevel(string) error
func (*NullLogger) Warn ¶
func (n *NullLogger) Warn() Entry
type NullLoggerEntry ¶
type NullLoggerEntry struct{}
func (*NullLoggerEntry) Logf ¶
func (n *NullLoggerEntry) Logf(string, ...interface{})
func (*NullLoggerEntry) WithField ¶
func (n *NullLoggerEntry) WithField(key string, value interface{}) Entry
func (*NullLoggerEntry) WithFields ¶
func (n *NullLoggerEntry) WithFields(fields map[string]interface{}) Entry
func (*NullLoggerEntry) WithString ¶
func (n *NullLoggerEntry) WithString(key, value string) Entry
Click to show internal directories.
Click to hide internal directories.