Documentation ¶
Index ¶
- type Logger
- func (l *Logger) Debug(msg string, args ...interface{})
- func (l *Logger) Error(msg string, args ...interface{}) error
- func (l *Logger) Fatal(msg string, args ...interface{})
- func (l *Logger) HostName(hostName string) (log *Logger)
- func (l *Logger) IncludeStack(included bool) (log *Logger)
- func (l *Logger) Info(msg string, args ...interface{})
- func (l *Logger) IsDebug() bool
- func (l *Logger) IsInfo() bool
- func (l *Logger) IsTrace() bool
- func (l *Logger) IsWarn() bool
- func (l *Logger) Label(key string, value string)
- func (l *Logger) Log(level int, msg string, args []interface{})
- func (l *Logger) SetLevel(lvl int)
- func (l *Logger) Trace(msg string, args ...interface{})
- func (l *Logger) Warn(msg string, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
Logger encapsulates the logging device that is used to emit logs and as a receiver that has the logging methods
func NewErrLogger ¶
NewErrLogger can be used to instantiate a wrapper logger with a module label with output going stderr
func NewLogger ¶
NewLogger can be used to instantiate a wrapper logger with a module label with output going stdout
func (*Logger) Debug ¶
Debug is a method for output of debugging level messages with a varargs style list of parameters that is formatted as label and then the value in a single list
func (*Logger) Error ¶
Error is a method for output of error level messages with a varargs style list of parameters that is formatted as label and then the value in a single list
func (*Logger) Fatal ¶
Fatal is a method for output of fatal level messages with a varargs style list of parameters that is formatted as label and then the value in a single list
func (*Logger) HostName ¶
HostName is used to add an optional host name to messages, if empty then the host name will not be output
func (*Logger) IncludeStack ¶
IncludeStack is used to enable a small function call stack to be included with messages
func (*Logger) Info ¶
Info is a method for output of informational level messages with a varargs style list of parameters that is formatted as label and then the value in a single list
func (*Logger) IsDebug ¶
IsDebug returns true in the event that the theshold logging level allows for debugging messages to appear in the output
func (*Logger) IsInfo ¶
IsInfo returns true in the event that the theshold logging level allows for informational messages to appear in the output
func (*Logger) IsTrace ¶
IsTrace returns true in the event that the theshold logging level allows for trace messages to appear in the output
func (*Logger) IsWarn ¶
IsWarn returns true in the event that the theshold logging level allows for warning messages to appear in the output
func (*Logger) Log ¶
Log is a method for output of parameterized level messages with a varargs style list of parameters that is formatted as label and then the value in a single list
func (*Logger) SetLevel ¶
SetLevel can be used to set the threshold for the level of messages that will be output by the logger