Documentation ¶
Index ¶
Constants ¶
View Source
const ( OutputStdout = "stdout" // default OutputStderr = "stderr" OutputFile = "file" FormatJSON = "json" // default FormatText = "text" LevelDebug = "debug" // default LevelInfo = "info" LevelWarn = "warn" LevelError = "error" LevelFatal = "fatal" LevelPanic = "panic" )
Variables ¶
This section is empty.
Functions ¶
func FormatSize ¶
func SetDefaultLog ¶
func SetDefaultLog(l Logger)
Types ¶
type Logger ¶
type Logger interface { Debug(string) Info(string) Warn(string) Error(string) Fatal(string) Panic(string) AddCallerSkip(int) Logger WithMap(fields map[string]interface{}) Logger WithFields(string, interface{}, ...interface{}) Logger }
func GetDefaultLog ¶
func GetDefaultLog() Logger
func WithFields ¶
type Options ¶
type Options struct { Output string `json:"output" yaml:"output"` Format string `json:"format" yaml:"format"` Level string `json:"level" yaml:"level"` TimeFormat string `json:"time_format" yaml:"time_format"` // Output == OutputFile FileName string `json:"file_name" yaml:"file_name"` Size int `json:"size" yaml:"size"` NoAddCaller bool `json:"no_caller" yaml:"no_caller"` }
Click to show internal directories.
Click to hide internal directories.