Skip to content

Commit

Permalink
refactor: match log/slog level values
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Oct 31, 2023
1 parent 7e55b91 commit 283fdeb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions level.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package log

import (
"math"
"strings"
)

Expand All @@ -9,17 +10,17 @@ type Level int32

const (
// DebugLevel is the debug level.
DebugLevel Level = iota - 1
DebugLevel Level = -4
// InfoLevel is the info level.
InfoLevel
InfoLevel Level = 0
// WarnLevel is the warn level.
WarnLevel
WarnLevel Level = 4
// ErrorLevel is the error level.
ErrorLevel
ErrorLevel Level = 8
// FatalLevel is the fatal level.
FatalLevel
FatalLevel Level = 12
// noLevel is used with log.Print.
noLevel
noLevel Level = math.MaxInt32
)

// String returns the string representation of the level.
Expand Down

0 comments on commit 283fdeb

Please sign in to comment.