Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultTimeFormat = "2006-01-02 15:04:05.000"
DefaultTimeFormat is our default time format
Variables ¶
View Source
var ErrUnknownLevel = fmt.Errorf("Unknown log level")
ErrUnknownLevel is returned by LevelFromString
Functions ¶
This section is empty.
Types ¶
type Level ¶
type Level int
Level is the log level
func LevelFromString ¶
LevelFromString returns the log level from string representation
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is our logger struct
func (*Logger) SetLogLevel ¶
type Option ¶
type Option func(*options)
Option is our option type
func WithTimeFormat ¶
WithTimeFormat sets the time format. Specify empty time format to disable datetime in logs.
Click to show internal directories.
Click to hide internal directories.