Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(message string, extras ...string)
- func DebugTimed(message string, timestamp int64, extras ...string)
- func Error(message string, extras ...string)
- func ErrorTimed(message string, timestamp int64, extras ...string)
- func Fatal(message string, extras ...string)
- func FatalTimed(message string, timestamp int64, extras ...string)
- func GetDateFormat() string
- func GetExtrasFormat() string
- func GetExtrasSeparator() string
- func GetLogFormat() string
- func GetLogLevel() logLevel
- func GetTimediffFormat() string
- func Info(message string, extras ...string)
- func InfoTimed(message string, timestamp int64, extras ...string)
- func SetDateFormat(format string)
- func SetExtrasFormat(format string)
- func SetExtrasSeparator(separator string)
- func SetLogFormat(format string)
- func SetLogLevel(level logLevel)
- func SetLogLevelByLevel(level int)
- func SetLogLevelByName(name string)
- func SetTimediffFormat(format string)
- func Warning(message string, extras ...string)
- func WarningTimed(message string, timestamp int64, extras ...string)
Constants ¶
View Source
const PLACEHOLDER_EXTRAS = "$EXTRAS$"
extras placeholder
View Source
const PLACEHOLDER_LOGLEVEL = "$LOGLEVEL$"
log level placeholder
View Source
const PLACEHOLDER_MESSAGE = "$MESSAGE$"
message placeholder
View Source
const PLACEHOLDER_TIMEDIFF = "$TIMEDIFF$"
time difference placeholder
View Source
const PLACEHOLDER_TIMESTAMP = "$TIMESTAMP$"
timestamp placeholder
Variables ¶
View Source
var DebugLevel = logLevel{0, "debug", *color.New(color.FgCyan)}
debug log level (level = 0, name = "debug")
View Source
var ErrorLevel = logLevel{3, "error", *color.New(color.FgRed)}
error log level (level = 3, name = "error")
fatal log level (level = 4, name = "fatal")
View Source
var InfoLevel = logLevel{1, "info", *color.New(color.FgGreen)}
info log level (level = 1, name = "info")
View Source
var WarningLevel = logLevel{2, "warning", *color.New(color.FgYellow)}
warning log level (level = 2, name = "warning")
Functions ¶
func DebugTimed ¶
debug logging with time difference calculation
func ErrorTimed ¶
error logging with time difference calculation
func FatalTimed ¶
fatal logging with time difference calculation
func WarningTimed ¶
warning logging with time difference calculation
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.