summaryrefslogtreecommitdiff
path: root/internal/utils/log/level.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/utils/log/level.go')
-rw-r--r--internal/utils/log/level.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/internal/utils/log/level.go b/internal/utils/log/level.go
new file mode 100644
index 0000000..7b68b0c
--- /dev/null
+++ b/internal/utils/log/level.go
@@ -0,0 +1,25 @@
+package log
+
+type Level int
+
+func (l Level) String() string {
+ switch l {
+ case LevelDebug:
+ return "DEBUG"
+ case LevelInfo:
+ return "INFO"
+ case LevelWarn:
+ return "WARN"
+ case LevelError:
+ return "ERROR"
+ default:
+ return ""
+ }
+}
+
+const (
+ LevelDebug Level = -4
+ LevelInfo Level = 0
+ LevelWarn Level = 4
+ LevelError Level = 8
+)