aboutsummaryrefslogtreecommitdiffhomepage
path: root/logger
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-01-29 20:46:01 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-01-29 20:47:09 -0800
commitc8138351c9737e3286a128c78f39e4f8a23e7bc9 (patch)
tree3d496f051524a10e1c398f7575d3e8a6e683fae8 /logger
parent24a2f472ec8593b4734e91ac15ee5503d16ae63a (diff)
Keep code base tidy
Diffstat (limited to 'logger')
-rw-r--r--logger/logger.go15
1 files changed, 7 insertions, 8 deletions
diff --git a/logger/logger.go b/logger/logger.go
index 01d041c..a7ef3c1 100644
--- a/logger/logger.go
+++ b/logger/logger.go
@@ -12,24 +12,23 @@ import (
var requestedLevel = InfoLevel
-// LogLevel type
+// LogLevel type.
type LogLevel uint32
const (
- // FatalLevel should be used in fatal situations, the app will exit
+ // FatalLevel should be used in fatal situations, the app will exit.
FatalLevel LogLevel = iota
- // ErrorLevel should be used when someone should really look at the error
+ // ErrorLevel should be used when someone should really look at the error.
ErrorLevel
- // InfoLevel should be used during normal operations
+ // InfoLevel should be used during normal operations.
InfoLevel
- // DebugLevel should be used only during development
+ // DebugLevel should be used only during development.
DebugLevel
)
-// Convert the Level to a string.
func (level LogLevel) String() string {
switch level {
case DebugLevel:
@@ -40,9 +39,9 @@ func (level LogLevel) String() string {
return "ERROR"
case FatalLevel:
return "FATAL"
+ default:
+ return "UNKNOWN"
}
-
- return "UNKNOWN"
}
// EnableDebug increases logging, more verbose (debug)