Documentation ¶
Index ¶
- Variables
- func Debug(v ...interface{})
- func DebugF(format string, v ...interface{})
- func Error(v ...interface{})
- func ErrorF(format string, v ...interface{})
- func Fatal(v ...interface{})
- func FatalF(format string, v ...interface{})
- func Info(v ...interface{})
- func InfoF(format string, v ...interface{})
- func Panic(v ...interface{})
- func PanicF(format string, v ...interface{})
- func SetAdapter(adapter Adapter)
- func Warn(v ...interface{})
- func WarnF(format string, v ...interface{})
- func WithHook(fns ...func(msg *Message))
- type Adapter
- type ConsoleAdapter
- type DataField
- type Entry
- func (entry *Entry) Debug(v ...interface{})
- func (entry *Entry) DebugF(format string, v ...interface{})
- func (entry *Entry) Error(v ...interface{})
- func (entry *Entry) ErrorF(format string, v ...interface{})
- func (entry *Entry) Fatal(v ...interface{})
- func (entry *Entry) FatalF(format string, v ...interface{})
- func (entry *Entry) Info(v ...interface{})
- func (entry *Entry) InfoF(format string, v ...interface{})
- func (entry *Entry) Panic(v ...interface{})
- func (entry *Entry) PanicF(format string, v ...interface{})
- func (entry *Entry) Warn(v ...interface{})
- func (entry *Entry) WarnF(format string, v ...interface{})
- func (entry *Entry) WithField(field string, value interface{}) *Entry
- func (entry *Entry) WithTag(tags ...string) *Entry
- type Level
- type Logger
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) DebugF(format string, v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) ErrorF(format string, v ...interface{})
- func (l *Logger) Fatal(v ...interface{})
- func (l *Logger) FatalF(format string, v ...interface{})
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) InfoF(format string, v ...interface{})
- func (l *Logger) Panic(v ...interface{})
- func (l *Logger) PanicF(format string, v ...interface{})
- func (l *Logger) SetAdapter(adapter Adapter)
- func (l *Logger) Warn(v ...interface{})
- func (l *Logger) WarnF(format string, v ...interface{})
- func (l *Logger) WithField(field string, value interface{}) *Entry
- func (l *Logger) WithHook(fns ...func(msg *Message))
- func (l *Logger) WithTag(tags ...string) *Entry
- type Message
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LevelText = map[Level]string{ DEBUG: "DEBUG", INFO: "INFO", WARN: "WARN", ERROR: "ERROR", PANIC: "PANIC", FATAL: "FATAL", } Colors = map[Level]brush{ DEBUG: newBrush("1;34"), INFO: newBrush("1;32"), WARN: newBrush("1;33"), ERROR: newBrush("1;31"), PANIC: newBrush("1;37"), FATAL: newBrush("1;35"), } )
Functions ¶
func SetAdapter ¶
func SetAdapter(adapter Adapter)
Types ¶
type ConsoleAdapter ¶
type ConsoleAdapter struct { }
func (*ConsoleAdapter) Write ¶
func (ca *ConsoleAdapter) Write(msg *Message)
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewConsoleLog ¶
func NewConsoleLog() *Logger
func (*Logger) SetAdapter ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.