mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-26 14:15:53 -05: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
@ -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 New Issue
Block a user