Documentation
¶
Index ¶
Constants ¶
View Source
const ( LStage = "stage" LData = "data" LUserID = "userId" LUrl = "url" LMethod = "method" LService = "service" LContext = "context" LRequestID = "requestID" )
View Source
const ( LModeSilent = "SILENT" LModeTrace = "TRACE" LModeInfo = "INFO" LModeWarn = "WARN" LModeError = "ERROR" LModeDebug = "DEBUG" )
Variables ¶
This section is empty.
Functions ¶
func New ¶
New accepts configurations on logger and creates a new logger instance If no LogMode is set, it will default to debug level
func SetDefaultLogger ¶
SetDefaultLogger will override global logger defined
Types ¶
type DataParams ¶
type DataParams map[string]interface{}
DataParams can be used to pass data values to logger as interface e.g. zerolog.Info().Interface(LData, DataParams{"a": a, "b": b})
Click to show internal directories.
Click to hide internal directories.