Skip to content

Commit

Permalink
pkg/log: expose level fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
Sypheos committed Dec 19, 2024
1 parent e213adc commit 76bf959
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var (
log.WithSink(
multi.NewSink(
leveled.NewSink(
fetchLevel(),
FetchLevel(),
writer.NewStdoutSink(writer.NewDefaultFormatter(localPkg)),
),
leveled.NewSink(
Expand All @@ -49,7 +49,7 @@ func RegisterContextExtractor(ce log.ContextExtractor) {
Logger = log.NewLogger(loggerOpts...)
}

func fetchLevel() record.Level {
func FetchLevel() record.Level {
switch strings.ToUpper(cfg.FetchString("LOGGER_LEVEL", "")) {
case "DEBUG":
return record.Debug
Expand Down

0 comments on commit 76bf959

Please sign in to comment.