mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
make cli mode respect log.level (#2124)
Fixes #2119 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
7be8796d87
commit
4b02dc9565
1 changed files with 4 additions and 0 deletions
|
@ -732,6 +732,9 @@ func prefixV6() (*netip.Prefix, error) {
|
|||
// LoadCLIConfig returns the needed configuration for the CLI client
|
||||
// of Headscale to connect to a Headscale server.
|
||||
func LoadCLIConfig() (*Config, error) {
|
||||
logConfig := logConfig()
|
||||
zerolog.SetGlobalLevel(logConfig.Level)
|
||||
|
||||
return &Config{
|
||||
DisableUpdateCheck: viper.GetBool("disable_check_updates"),
|
||||
UnixSocket: viper.GetString("unix_socket"),
|
||||
|
@ -741,6 +744,7 @@ func LoadCLIConfig() (*Config, error) {
|
|||
Timeout: viper.GetDuration("cli.timeout"),
|
||||
Insecure: viper.GetBool("cli.insecure"),
|
||||
},
|
||||
Log: logConfig,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue