Create a distinct log section in config

This commit is contained in:
Igor Perepilitsyn committed 2022-09-11 21:37:23 +02:00
1 parent 7247302f45
commit dd155dca97
9 files changed
+62 -26

No files matched your search

+2 -2
View File
@@ -47,7 +47,7 @@ func initConfig() {
machineOutput := HasMachineOutputFlag()
zerolog.SetGlobalLevel(cfg.LogLevel)
zerolog.SetGlobalLevel(cfg.Log.Level)
// If the user has requested a "machine" readable format,
// then disable login so the output remains valid.
@@ -55,7 +55,7 @@ func initConfig() {
zerolog.SetGlobalLevel(zerolog.Disabled)
}
if cfg.JSONLogs {
if cfg.Log.Format == headscale.JSONLogFormat {
log.Logger = log.Output(os.Stdout)
}