Skip to content

Commit

Permalink
fixup! go-template/_template/cmd/app: swapped zap logger with log/slog
Browse files Browse the repository at this point in the history
  • Loading branch information
zalgonoise committed Mar 22, 2024
1 parent 880cb7b commit 15aeedc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _template/cmd/{{.Base.appName}}/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func main() {

//nolint:unparam // currently run returns no error; remove this exclusion directive if otherwise
func run() error {
logger := log.New(os.Getenv("LOG_LEVEL"))
logger := log.New(log.WithLevel(os.Getenv("LOG_LEVEL")))
ctx := context.Background()

logger.InfoContext(ctx, "Hello world!", slog.String("location", "world"))
Expand Down

0 comments on commit 15aeedc

Please sign in to comment.