Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LogFormatText represents human readable log format LogFormatText = "text" // DebugLevel represents debug level for logger DebugLevel = "debug" // TraceLevel represents trace level for logger TraceLevel = "trace" // InfoLevel represents info level for logger InfoLevel = "info" )
View Source
const FileKey = "file"
FileKey holds the file field
View Source
const FunctionKey = "function"
FunctionKey holds the function field
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶
InitLogger attempts to init logrus logger with output path passed in the parameter If path is incorrect or "" then init logger with stdout Receives logPath which is the file to write logs and logrus.Level which is level of logging (For example DEBUG, INFO) Returns created logrus.Logger or error if something went wrong
Types ¶
type RuntimeFormatter ¶
RuntimeFormatter decorates log entries with function name and package name (optional) and line number (optional)
Click to show internal directories.
Click to hide internal directories.