Skip to content

Commit

Permalink
add structured dracon logging
Browse files Browse the repository at this point in the history
  • Loading branch information
northdpole committed Jun 3, 2024
1 parent b22059d commit 4a92fee
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/log/dracon-logger.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package draconLogger

import (
"log/slog"
"os"
)

func SetDefault(logLevel slog.Level) {
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{Level: logLevel}))
slog.SetDefault(logger)
}

0 comments on commit 4a92fee

Please sign in to comment.