Documentation
¶
Overview ¶
Package gologger provides a simple layer for leveled logging in go.
Index ¶
- type Event
- type Logger
- func (l *Logger) Debug() *Event
- func (l *Logger) Error() *Event
- func (l *Logger) Fatal() *Event
- func (l *Logger) Info() *Event
- func (l *Logger) Log(event *Event)
- func (l *Logger) Print() *Event
- func (l *Logger) SetFormatter(formatter formatter.Formatter)
- func (l *Logger) SetMaxLevel(level levels.Level)
- func (l *Logger) SetTimestamp(timestamp bool, minLevel levels.Level)
- func (l *Logger) SetWriter(writer writer.Writer)
- func (l *Logger) Verbose() *Event
- func (l *Logger) Warning() *Event
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event is a log event to be written with data
func Warning ¶
func Warning() *Event
Warning writes a warning message on the screen with the default label
func (*Event) MsgFunc ¶
MsgFunc logs a message with lazy evaluation. Useful when computing the message can be resource heavy.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a logger for logging structured data in a beautfiul and fast manner.
var ( // DefaultLogger is the default logging instance DefaultLogger *Logger )
func (*Logger) SetFormatter ¶
SetFormatter sets the formatter instance for a logger
func (*Logger) SetMaxLevel ¶
SetMaxLevel sets the max logging level for logger
func (*Logger) SetTimestamp ¶
SetTimestamp enables/disables automatic timestamp
Click to show internal directories.
Click to hide internal directories.