Skip to content

Commit

Permalink
Make slog print debug messages when verbose mode is enabled (#541)
Browse files Browse the repository at this point in the history
UDENG-4624
  • Loading branch information
adombeck authored Sep 19, 2024
2 parents f9f8515 + aafb208 commit 7921867
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmd/authd/daemon/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"log/slog"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -97,6 +98,7 @@ func setVerboseMode(level int) {
fallthrough
default:
log.SetLevel(log.DebugLevel)
slog.SetLogLoggerLevel(slog.LevelDebug)
}
log.SetReportCaller(reportCaller)
}
2 changes: 1 addition & 1 deletion internal/services/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package services

import (
"context"
"log/slog"

"github.com/ubuntu/authd"
"github.com/ubuntu/authd/internal/brokers"
Expand All @@ -13,7 +14,6 @@ import (
"github.com/ubuntu/authd/internal/services/permissions"
"github.com/ubuntu/authd/internal/users"
"github.com/ubuntu/decorate"
"golang.org/x/exp/slog"
"google.golang.org/grpc"
)

Expand Down

0 comments on commit 7921867

Please sign in to comment.