summaryrefslogtreecommitdiff
path: root/internal/utils/log/level.go
diff options
context:
space:
mode:
authorKyren223 <ulmliad223@gmail.com>2024-10-05 01:16:29 +0300
committerKyren223 <ulmliad223@gmail.com>2024-10-05 01:16:29 +0300
commit0929041a9ccce566411e9a36713cb4125d72a1ed (patch)
tree946752c70ade73f8600b99c5ba8767268bfb5703 /internal/utils/log/level.go
parentddb2878cc2f7c8bcc89108726ecb2dba7c861539 (diff)
feat: implement logging system
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
+)