Skip to content

Commit

Permalink
Adjust NewApplicationLoggerCloser signature
Browse files Browse the repository at this point in the history
  • Loading branch information
janos committed Dec 21, 2022
1 parent 20e91aa commit aab8054
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
// NewApplicationLoggerCloser construct a logger and returns a closer of its
// writer. It uses ApplicationLogWriteCloser with
// iostuff.NewDailyReplaceableWriterConstructor for log rotation.
func NewApplicationLoggerCloser(dir, name string, newHandler func(io.Writer) slog.Handler, fallback io.Writer) (l *slog.Logger, closeFunc func() error) {
func NewApplicationLoggerCloser(dir, name string, newHandler func(io.Writer, *slog.HandlerOptions) slog.Handler, fallback io.Writer, o *slog.HandlerOptions) (l *slog.Logger, closeFunc func() error) {
w := ApplicationLogWriteCloser(dir, name, fallback)
return slog.New(newHandler(w)), w.Close
return slog.New(newHandler(w, o)), w.Close
}

// NewTextHandler calls slog.NewTextHandler but returns the Logger interface to
Expand Down

0 comments on commit aab8054

Please sign in to comment.