Documentation ¶
Index ¶
- Constants
- Variables
- func CheckLogLevel(lv string) bool
- func GetAllLogLevelsString(sep string) string
- func GetJsonFormat() *myLogger.JSONFormatter
- func GetLogrusLogLevel(lv string) myLogger.Level
- func GetTextFormat() *myLogger.TextFormatter
- func NewRawLogger(lv string) *myLogger.Logger
- func SetLogLevel(lg *myLogger.Logger, lv string)
- func WriteLogOnlyMsg(logWr *myLogger.Logger, msg string, level string)
- func WriteToLog(logWr *myLogger.Logger, fields myLogger.Fields, msg string, level string)
- func WriteToLogNoExtraMsg(logWr *myLogger.Logger, fields myLogger.Fields, level string)
- type LogConf
Constants ¶
View Source
const ( DEBUG = "debug" INFO = "info" WARNING = "warning" ERROR = "error" )
Variables ¶
Functions ¶
func CheckLogLevel ¶
func GetAllLogLevelsString ¶
func GetJsonFormat ¶
func GetJsonFormat() *myLogger.JSONFormatter
func GetLogrusLogLevel ¶
func GetTextFormat ¶
func GetTextFormat() *myLogger.TextFormatter
func NewRawLogger ¶
func SetLogLevel ¶
func WriteToLog ¶
Types ¶
type LogConf ¶
type LogConf struct { LogFile string `mapstructure:"logfile"` LogLevel string `mapstructure:"loglevel"` LogFormat string `mapstructure:"logformat"` }
func (*LogConf) CreateNewLogger ¶
logFile: full path of log file. default, os.Stdout is used logLevel: debug, info, warning, error. default warning is used format: json, text
Click to show internal directories.
Click to hide internal directories.