Skip to content

Commit 1e906ff

Browse files
authored
feat: use console-slogger as text handler (#3167)
Signed-off-by: Kit Patella <[email protected]>
1 parent 4c0521a commit 1e906ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pkg/logger/logger.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ func New(cfg Config) (*slog.Logger, error) {
134134

135135
switch cfg.Format.ToLower() {
136136
case FormatText:
137-
handler = slog.NewTextHandler(cfg.Destination, &opts)
137+
handler = console.NewHandler(cfg.Destination, &console.HandlerOptions{
138+
Level: slog.Level(cfg.Level),
139+
NoColor: true,
140+
})
138141
case FormatJSON:
139142
handler = slog.NewJSONHandler(cfg.Destination, &opts)
140143
case FormatConsole:

0 commit comments

Comments
 (0)