Skip to content

Commit

Permalink
exported logger.LogLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
derkan authored and HDT3213 committed Jan 13, 2025
1 parent 3197d82 commit 6aee2f9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ type Settings struct {
TimeFormat string `yaml:"time-format"`
}

type logLevel int
type LogLevel int

// Output levels
const (
DEBUG logLevel = iota
DEBUG LogLevel = iota
INFO
WARNING
ERROR
Expand All @@ -39,7 +39,7 @@ const (

type logEntry struct {
msg string
level logLevel
level LogLevel
}

var (
Expand All @@ -48,7 +48,7 @@ var (

// ILogger defines the methods that any logger should implement
type ILogger interface {
Output(level logLevel, callerDepth int, msg string)
Output(level LogLevel, callerDepth int, msg string)
}

// Logger is Logger
Expand Down Expand Up @@ -134,7 +134,7 @@ func Setup(settings *Settings) {
}

// Output sends a msg to logger
func (logger *Logger) Output(level logLevel, callerDepth int, msg string) {
func (logger *Logger) Output(level LogLevel, callerDepth int, msg string) {
var formattedMsg string
_, file, line, ok := runtime.Caller(callerDepth)
if ok {
Expand Down

0 comments on commit 6aee2f9

Please sign in to comment.