Skip to content

Commit

Permalink
fix: Apply writer from params (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
obalunenko committed Sep 18, 2023
1 parent 91fb192 commit f80c886
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,7 @@ func makeLogInstance(ctx context.Context, p Params) Logger {
level = LevelInfo
}

var out []io.Writer

out = append(out, os.Stdout)

w := io.MultiWriter(out...)

formatter := makeFormatter(w, p.Format, level, p.WithSource, replaceLevelNames)
formatter := makeFormatter(p.Writer, p.Format, level, p.WithSource, replaceLevelNames)

logInstance = slog.New(formatter)

Expand Down

0 comments on commit f80c886

Please sign in to comment.