system-config/playbooks/roles/install-docker/files/10-docker.conf
Ian Wienand 3303199ba6 install-docker: move rsyslog handler earlier
This syslog configuration is what sends any logs with a program-name
of "docker-<foo>" to /var/log/containers/foo.log.  However, at 98-
level the rules are after the default 50- rules, so we're seeing the
logs copied to both syslog and /var/log/containers.  Since this
contains a "stop" command, we should move this earlier before the
default rules and the docker logs will not be duplicated.

Change-Id: I0cbcd4694a4796573fe48383756be03597d2da0f
2021-02-25 09:16:16 +11:00

8 lines
176 B
Plaintext

# Create a template for the target log file
$template CUSTOM_LOGS,"/var/log/containers/%programname%.log"
if $programname startswith 'docker-' then {
?CUSTOM_LOGS
stop
}