Skip to content

fix: make syslog optional to prevent crash in Docker - #4

Merged
mylastresort merged 5 commits into
mainfrom
fix/syslog-crash-in-docker
Jul 23, 2026
Merged

fix: make syslog optional to prevent crash in Docker#4
mylastresort merged 5 commits into
mainfrom
fix/syslog-crash-in-docker

Conversation

@mylastresort

Copy link
Copy Markdown
Owner

Problem

The server crashes immediately on startup inside a Docker container:

calls which requires a running syslog daemon. Docker containers don't have one by default, so the connection fails and is called.

Fix

  • Make syslog optional in
  • If fails, log a warning to stderr and continue with stdout-only logging
  • Guard all syslog calls with nil checks to prevent panics

syslog.New() fails in containers without a syslog daemon, causing
os.Exit(1). Make syslog optional — fall back to stdout-only logging
when unavailable.
Fall back to /var/log/taskmaster.log when syslog is unavailable,
rather than silently dropping syslog messages.
@mylastresort
mylastresort force-pushed the fix/syslog-crash-in-docker branch from fcb0fcd to 8b3a392 Compare July 23, 2026 11:00
@mylastresort
mylastresort marked this pull request as ready for review July 23, 2026 21:19
@mylastresort
mylastresort merged commit 603eb46 into main Jul 23, 2026
@mylastresort
mylastresort deleted the fix/syslog-crash-in-docker branch July 23, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant