Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { Infof(format string, v ...interface{}) Warnf(format string, v ...interface{}) Printf(format string, v ...interface{}) Donef(format string, v ...interface{}) Debugf(format string, v ...interface{}) Errorf(format string, v ...interface{}) TInfof(format string, v ...interface{}) TWarnf(format string, v ...interface{}) TPrintf(format string, v ...interface{}) TDonef(format string, v ...interface{}) TDebugf(format string, v ...interface{}) TErrorf(format string, v ...interface{}) Println() EnableDebugLog(enable bool) }
Logger ...
type LoggerOptions ¶
type LoggerOptions func(*logger)
LoggerOptions ...
func WithPrefix ¶
func WithPrefix(prefix string) LoggerOptions
WithPrefix adds a prefix to each log line. Prefix is added before the timestamp if timestamps are enabled. It does not add any extra spaces, so if you want a space after the prefix, include it in the prefix string.
func WithTimestampLayout ¶
func WithTimestampLayout(layout string) LoggerOptions
WithTimestampLayout ...
Click to show internal directories.
Click to hide internal directories.