Fix dnsmasq logging to syslog as well as stderr

This commit is contained in:
Brian Picciano 2024-12-16 12:49:57 +01:00
parent 03b19df115
commit 4151fe8f17
3 changed files with 9 additions and 10 deletions

View File

@ -68,8 +68,15 @@ func dnsmasqPmuxProc(
} }
cfg := pmuxlib.ProcessConfig{ cfg := pmuxlib.ProcessConfig{
Cmd: filepath.Join(binDirPath, "dnsmasq"), Cmd: filepath.Join(binDirPath, "dnsmasq"),
Args: []string{"-d", "-C", confPath}, Args: []string{
// Don't daemonize. The docs say to use --keep-in-foreground in
// production, and that this flag is for debugging only, but only
// with this flag will sigint work as expected.
"--no-daemon",
"--log-facility=-", // Log only to stderr
"-C", confPath,
},
} }
cfg = withPmuxLoggers(ctx, logger, "dnsmasq", cfg) cfg = withPmuxLoggers(ctx, logger, "dnsmasq", cfg)

View File

@ -1,8 +0,0 @@
---
type: task
---
# Fix dnsmasq Logging Capture
The dnsmasq process's logging is not being captured into mlog, but instead is
being written directly to stdout/stderr.