diff --git a/pkg/log/dracon-logger.go b/pkg/log/dracon-logger.go new file mode 100644 index 000000000..63c55f0e9 --- /dev/null +++ b/pkg/log/dracon-logger.go @@ -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) +}