Repository navigation
feat(darwin): add launchd log file - #5878
devin-integration-bot wants to merge 2 commits into
Conversation
add launchd log file Signed-off-by: kovacs <[email protected]>
add '-w' option Signed-off-by: kovacs <[email protected]>
| ret = err | ||
| } | ||
| out, err = exec.Command("launchctl", "unload", sysPlist).CombinedOutput() | ||
| out, err = exec.Command("launchctl", "unload", "-w", sysPlist).CombinedOutput() |
There was a problem hiding this comment.
Do we know when launctl added the -w flag? macOS releases back to 10.13 are supported.
There was a problem hiding this comment.
I haven't found a changelog for launctl, so I'm not sure if the -w option is available in 10.13, unfortunately I don't currently have a 10.13 system.
So do I need to remove this option? Or do some other work?
There was a problem hiding this comment.
This appears to exist at least as of Sept. 2016, per the source code for launchctl:
https://github.com/apple-opensource/launchd/blob/master/support/launchctl.c#L2649-L2651
That source release is launchd 842.92.1, which was in macOS 10.9.5, before 10.13.
| <key>StandardOutPath</key> | ||
| <string>/var/log/tailscaled.log</string> | ||
|
|
||
| <key>StandardErrorPath</key> | ||
| <string>/var/log/tailscaled.log</string> | ||
|
|
There was a problem hiding this comment.
Do these get rotated?
Is it okay/defined for stdout+stderr to have the same value?
There was a problem hiding this comment.
Currently the log size is unlimited, a feasible solution is to increase the newsyslog configuration, such as /etc/newsyslog.d/wifi.conf.
If the log is not configured, it seems that the log will be discarded and cannot be viewed.
add launchd log file
Signed-off-by: kovacs [email protected]