[client] Restrict debug bundle log path and upload destinations (#6975)

This commit is contained in:
Viktor Liu
2026-07-31 19:12:56 +02:00
committed by GitHub
parent f51fadf8d4
commit feecb993f4
24 changed files with 976 additions and 73 deletions
+4 -6
View File
@@ -8,21 +8,19 @@ import (
log "github.com/sirupsen/logrus"
"github.com/netbirdio/netbird/client/configs"
"github.com/netbirdio/netbird/client/ui/guilog"
)
// uiLogFileName must stay in sync with the daemon's "gui-client*.log.*" glob
// for rotated siblings (addUILog in client/internal/debug).
const uiLogFileName = "gui-client.log"
// uiLogPath returns the GUI log path with native separators, since the daemon
// opens it directly for debug-bundle collection.
// opens it directly for debug-bundle collection. The file name comes from
// configs.UILogFile so the daemon validates and collects the same name.
func uiLogPath() (string, error) {
dir, err := os.UserConfigDir()
if err != nil {
return "", err
}
return filepath.Join(dir, "netbird", uiLogFileName), nil
return filepath.Join(dir, "netbird", configs.UILogFile), nil
}
// newDebugLog builds the GUI debug log, disabled when userSetLogFile is set