refactor logger init function
This commit is contained in:
parent
60aea576dc
commit
b988e4cf51
2 changed files with 3 additions and 2 deletions
|
@ -30,7 +30,7 @@ func handleRootCmd(cmd *cobra.Command, args []string) {
|
|||
slog.Error("failed to initialize config", "error", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
log := logger.InitializeLogger()
|
||||
log := logger.Initialize()
|
||||
config.SubstituteKeys(log)
|
||||
|
||||
validation := config.IsValid()
|
||||
|
|
|
@ -8,7 +8,8 @@ import (
|
|||
"code.lila.network/adoralaura/certwarden-deploy/internal/configuration"
|
||||
)
|
||||
|
||||
func InitializeLogger() *slog.Logger {
|
||||
// Initialize initializes a *slog.Logger with the right log level and options.
|
||||
func Initialize() *slog.Logger {
|
||||
logLevel := slog.LevelInfo
|
||||
|
||||
if configuration.VerboseLogging {
|
||||
|
|
Loading…
Reference in a new issue