Documentation ¶
Index ¶
Constants ¶
View Source
const ( StackdriverErrKey = "@type" StackdriverErrorValue = "type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent" LogLevelPanic = "panic" LogLevelFatal = "fatal" LogLevelError = "error" LogLevelWarn = "warn" LogLevelInfo = "info" LogLevelDebug = "debug" LogLevelTrace = "trace" LogFormatText = "text" LogFormatJson = "json" LogFormatFluentd = "fluentd" FormatText OutFormat = iota + 1 FormatJson FormatFluentd )
Variables ¶
This section is empty.
Functions ¶
func GetLogger ¶
GetLogger, return singleton logger instance Usage:
log := lxLog.GetLogger() log.WithFields(logrus.Fields{ "omg": true, "number": 100, lxLog.StackdriverErrKey: lxLog.StackdriverErrorValue, }).Error("Error without Stack and stackdriver error event!")
func GetMessageWithStack ¶ added in v1.5.7
GetMessageWithStack, return message string with stack trace Usage:
log.WithFields(logrus.Fields{ "omg": true, "number": 100, }).Error(lxLog.GetMessageWithStack("Error with Stack!"))
Types ¶
Click to show internal directories.
Click to hide internal directories.