Skip to content

worker: Allow logging to stderr

Tomáš Pecka requested to merge dev-tp into staging

In deployment we use docker logs forwarded to journald. I'd really want to log directly into host's journal but that is a task for some other day.

Docker logs apparently [1] make the message's severity higher if it is parsed from stderr.

Worker will now log WARNING and higher to stderr if invoked with --log-stderr option. We modified spdlog's dist_sink to enable this functionality.

Closes #46 (closed).

[1] https://github.com/docker/docker-ce/blob/96d50fd61df5a62a26609523619f5a5386b7d6db/components/engine/daemon/logger/journald/journald.go#L122

Merge request reports