Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DEBUG log level DEBUG = Level{Text: "Debug", Severity: 0} // INFO log level INFO = Level{Text: "Info", Severity: 1} // WARNING log level WARNING = Level{Text: "Warning", Severity: 2} // ERROR log level ERROR = Level{Text: "Error", Severity: 3} // FATAL log level FATAL = Level{Text: "Fatal", Severity: 4} )
Functions ¶
This section is empty.
Types ¶
type ILog ¶
type ILog interface { Warnf(format string, v ...interface{}) Warn(v ...interface{}) Error(err error, v ...interface{}) Errorf(err error, format string, v ...interface{}) Fatal(err error, v ...interface{}) Fatalf(err error, format string, v ...interface{}) Debug(v ...interface{}) Debugf(format string, v ...interface{}) Print(v ...interface{}) Printf(format string, v ...interface{}) GetWriter(level Level) io.Writer }
ILog interface
type Level ¶
type Level struct { // Text representation of the log Text string // Severity value of the log Severity int }
Level of the log
func GetLogLevel ¶
GetLogLevel gets the log level for input text
type Message ¶
type Message struct { Text string `json:"text"` Level Level `json:"level"` ServiceName string `json:"serviceName"` Time int64 `json:"time"` Hostname string `json:"hostname"` }
Message to be sent to centralized logger
Click to show internal directories.
Click to hide internal directories.