summaryrefslogtreecommitdiff
path: root/logging
diff options
context:
space:
mode:
authorKeuin <[email protected]>2023-07-14 22:29:35 +0800
committerKeuin <[email protected]>2023-07-14 22:29:35 +0800
commit49082656b79cea1d5ea21fe92564eaddd9b5843a (patch)
treee0d98cfd17e3c0fe044424d32396068b25e4096d /logging
parent2ace07d2d88c01a56b4d0f3194bd74a518a769c8 (diff)
Refactor: use proper const name.0.4.0
Diffstat (limited to 'logging')
-rw-r--r--logging/logger.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/logging/logger.go b/logging/logger.go
index 9724c2f..f5de019 100644
--- a/logging/logger.go
+++ b/logging/logger.go
@@ -21,21 +21,21 @@ type Logger struct {
}
const (
- kDebug = "DEBUG"
- kInfo = "INFO"
- kWarning = "WARNING"
- kError = "ERROR"
- kFatal = "FATAL"
+ levelDebug = "DEBUG"
+ levelInfo = "INFO"
+ levelWarning = "WARNING"
+ levelError = "ERROR"
+ levelFatal = "FATAL"
)
func NewWrappedLogger(delegate *log.Logger, name string) Logger {
return Logger{
delegate: delegate,
- debugHeader: fmt.Sprintf("[%v][%v]", name, kDebug),
- infoHeader: fmt.Sprintf("[%v][%v]", name, kInfo),
- warningHeader: fmt.Sprintf("[%v][%v]", name, kWarning),
- errorHeader: fmt.Sprintf("[%v][%v]", name, kError),
- fatalHeader: fmt.Sprintf("[%v][%v]", name, kFatal),
+ debugHeader: fmt.Sprintf("[%v][%v]", name, levelDebug),
+ infoHeader: fmt.Sprintf("[%v][%v]", name, levelInfo),
+ warningHeader: fmt.Sprintf("[%v][%v]", name, levelWarning),
+ errorHeader: fmt.Sprintf("[%v][%v]", name, levelError),
+ fatalHeader: fmt.Sprintf("[%v][%v]", name, levelFatal),
}
}