Skip to content

Commit

Permalink
Fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Piszmog committed Nov 28, 2024
1 parent 23b1aef commit 83ab2fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
func New(level Level, output Output) *slog.Logger {
var h slog.Handler
switch output {
case OutputJson:
case OutputJSON:
h = slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{Level: level.ToSlog()})
case OutputText:
h = slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{Level: level.ToSlog()})
fallthrough
default:
h = slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{Level: level.ToSlog()})
}
Expand Down Expand Up @@ -75,8 +75,8 @@ func GetLevel() Level {
type Output string

const (
// OutputJson is the JSON log output.
OutputJson Output = "json"
// OutputJSON is the JSON log output.
OutputJSON Output = "json"
// OutputText is the text log output.
OutputText Output = "text"
)
Expand All @@ -85,7 +85,7 @@ const (
func ToOutput(output string) Output {
switch output {
case "json":
return OutputJson
return OutputJSON
case "text":
return OutputText
default:
Expand Down

0 comments on commit 83ab2fb

Please sign in to comment.