From 6aee2f91e37a03fafbaeba72ffc7f45d20c9db16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkan=20DURMU=C5=9E?= Date: Wed, 27 Nov 2024 01:28:38 +0300 Subject: [PATCH] exported logger.LogLevel --- lib/logger/logger.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/logger/logger.go b/lib/logger/logger.go index f82b9e5..79cc210 100644 --- a/lib/logger/logger.go +++ b/lib/logger/logger.go @@ -20,11 +20,11 @@ type Settings struct { TimeFormat string `yaml:"time-format"` } -type logLevel int +type LogLevel int // Output levels const ( - DEBUG logLevel = iota + DEBUG LogLevel = iota INFO WARNING ERROR @@ -39,7 +39,7 @@ const ( type logEntry struct { msg string - level logLevel + level LogLevel } var ( @@ -48,7 +48,7 @@ var ( // ILogger defines the methods that any logger should implement type ILogger interface { - Output(level logLevel, callerDepth int, msg string) + Output(level LogLevel, callerDepth int, msg string) } // Logger is Logger @@ -134,7 +134,7 @@ func Setup(settings *Settings) { } // Output sends a msg to logger -func (logger *Logger) Output(level logLevel, callerDepth int, msg string) { +func (logger *Logger) Output(level LogLevel, callerDepth int, msg string) { var formattedMsg string _, file, line, ok := runtime.Caller(callerDepth) if ok {