diff --git a/examples/custom-handler/main.go b/examples/custom-handler/main.go index a4f2701..665acc5 100644 --- a/examples/custom-handler/main.go +++ b/examples/custom-handler/main.go @@ -13,7 +13,7 @@ func main() { clog.SetLevel(log.DebugLevel) // Create a new logger with the custom handler. - l := logger.NewLogger(clog) + l := logger.NewLogger(logger.Opts{Handler: clog}) // Log some messages. l.Debug("I'm not sure what's happening.") diff --git a/examples/extension/main.go b/examples/extension/main.go index 5a4ac84..7a5cea3 100644 --- a/examples/extension/main.go +++ b/examples/extension/main.go @@ -31,11 +31,11 @@ func (l *loggerExtension) Success(msg string, args ...any) { func NewLogger() Logger { return &loggerExtension{ - Logger: logger.NewLogger( - slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{ + Logger: logger.NewLogger(logger.Opts{ + Handler: slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{ ReplaceAttr: replaceAttr, }), - ), + }), } }