Log errors on debug

This commit is contained in:
Viktor Liu
2025-10-10 16:11:13 +02:00
parent 316c0afa9a
commit 34b55c600e
2 changed files with 23 additions and 5 deletions
+8
View File
@@ -698,6 +698,14 @@ var sshProxyCmd = &cobra.Command{
}
func sshProxyFn(cmd *cobra.Command, args []string) error {
logOutput := "console"
if firstLogFile := util.FindFirstLogPath(logFiles); firstLogFile != "" && firstLogFile != "/var/log/netbird/client.log" {
logOutput = firstLogFile
}
if err := util.InitLog(logLevel, logOutput); err != nil {
return fmt.Errorf("init log: %w", err)
}
host := args[0]
portStr := args[1]