Added DetailedLogger
This commit is contained in:
parent
b99e508a9b
commit
4f66d9c6da
1 changed files with 10 additions and 2 deletions
|
|
@ -24,8 +24,16 @@ func checkIfLogFolderExists(){
|
|||
|
||||
var logger = createLogger(logrus.WarnLevel)
|
||||
|
||||
func Logger(section string) *logrus.Entry {
|
||||
return logger.WithField("section", section)
|
||||
|
||||
func DetailedLogger(name string, section string) *logrus.Entry {
|
||||
return logger.WithFields(logrus.Fields{
|
||||
"loggerName": name,
|
||||
"section": section,
|
||||
})
|
||||
}
|
||||
|
||||
func Logger(name string) *logrus.Entry {
|
||||
return logger.WithField("loggerName", name)
|
||||
}
|
||||
|
||||
func createLogger(logLevel logrus.Level) *logrus.Logger{
|
||||
|
|
|
|||
Reference in a new issue