From 4f66d9c6da0a4c15b9f74553de271f071bfbb690 Mon Sep 17 00:00:00 2001 From: netbenix Date: Sat, 6 Nov 2021 22:40:43 +0100 Subject: [PATCH] Added DetailedLogger --- Lotus/Logging.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Lotus/Logging.go b/Lotus/Logging.go index c224802..a5df7c5 100644 --- a/Lotus/Logging.go +++ b/Lotus/Logging.go @@ -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{