Skip to content

Commit

Permalink
Switch to typed LogLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
heewa committed Jul 2, 2015
1 parent f2ac5fe commit b74d667
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions log/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ import (
"time"
)

type LogLevel int

const (
LevelFatal = iota
LevelFatal LogLevel = iota
LevelError
LevelWarn
LevelInfo
Expand Down Expand Up @@ -74,7 +76,7 @@ const (
)

var (
Level int
Level LogLevel
Flags int

DefaultLogger *Logger
Expand Down Expand Up @@ -322,7 +324,7 @@ func NewWithID(id string) *Logger {
// logger, which is a standard lib's *log.Logger instance.
type Logger struct {
ID string
Level int
level LogLevel

formatter logFormatter
staticArgs map[string]string
Expand Down

1 comment on commit b74d667

@biasedbit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.