mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-14 09:29:07 +02:00
ios: pass log file path through NewClient constructor (#6393)
Add logFilePath field to Client struct and expose it as a parameter in NewClient so callers provide the Go log path at construction time. Wire it into DebugBundle via GeneratorDependencies.LogPath so the debug bundle includes client.log and swift-log.log regardless of whether the bundle is triggered by the app or the management server. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c5ea58c5ad
commit
7470fbddd7
@@ -68,6 +68,7 @@ type Client struct {
|
|||||||
cfgFile string
|
cfgFile string
|
||||||
stateFile string
|
stateFile string
|
||||||
cacheDir string
|
cacheDir string
|
||||||
|
logFilePath string
|
||||||
recorder *peer.Status
|
recorder *peer.Status
|
||||||
ctxCancel context.CancelFunc
|
ctxCancel context.CancelFunc
|
||||||
ctxCancelLock *sync.Mutex
|
ctxCancelLock *sync.Mutex
|
||||||
@@ -87,11 +88,12 @@ type Client struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NewClient instantiate a new Client
|
// NewClient instantiate a new Client
|
||||||
func NewClient(cfgFile, stateFile, cacheDir, deviceName string, osVersion string, osName string, networkChangeListener NetworkChangeListener, dnsManager DnsManager) *Client {
|
func NewClient(cfgFile, stateFile, cacheDir, logFilePath, deviceName string, osVersion string, osName string, networkChangeListener NetworkChangeListener, dnsManager DnsManager) *Client {
|
||||||
return &Client{
|
return &Client{
|
||||||
cfgFile: cfgFile,
|
cfgFile: cfgFile,
|
||||||
stateFile: stateFile,
|
stateFile: stateFile,
|
||||||
cacheDir: cacheDir,
|
cacheDir: cacheDir,
|
||||||
|
logFilePath: logFilePath,
|
||||||
deviceName: deviceName,
|
deviceName: deviceName,
|
||||||
osName: osName,
|
osName: osName,
|
||||||
osVersion: osVersion,
|
osVersion: osVersion,
|
||||||
@@ -219,6 +221,7 @@ func (c *Client) DebugBundle(anonymize bool) (string, error) {
|
|||||||
StatusRecorder: c.recorder,
|
StatusRecorder: c.recorder,
|
||||||
TempDir: c.cacheDir,
|
TempDir: c.cacheDir,
|
||||||
StatePath: c.stateFile,
|
StatePath: c.stateFile,
|
||||||
|
LogPath: c.logFilePath,
|
||||||
}
|
}
|
||||||
|
|
||||||
if cc != nil {
|
if cc != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user