mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 19:05:37 +00:00
Use syslog local0 for docker logs
This allows log rotation, redirect via syslog etc. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
e0eda2d1e0
commit
f69f9a3427
29
alpine/etc/syslog.conf
Normal file
29
alpine/etc/syslog.conf
Normal file
@ -0,0 +1,29 @@
|
||||
# /etc/syslog.conf Configuration file for syslogd.
|
||||
#
|
||||
# For more information see syslog.conf(5)
|
||||
# manpage.
|
||||
|
||||
# First some standard logfiles. Log by facility.
|
||||
#
|
||||
|
||||
auth,authpriv.* /var/log/auth.log
|
||||
*.*;auth,authpriv.none -/var/log/syslog
|
||||
cron.* /var/log/cron.log
|
||||
daemon.* -/var/log/daemon.log
|
||||
kern.* -/var/log/kern.log
|
||||
lpr.* -/var/log/lpr.log
|
||||
mail.* -/var/log/mail.log
|
||||
user.* -/var/log/user.log
|
||||
|
||||
# Local facilities for our programs
|
||||
local0.* -/var/log/docker.log
|
||||
|
||||
# Some `catch-all' logfiles.
|
||||
#
|
||||
*.=debug;\
|
||||
auth,authpriv.none;\
|
||||
news.none;mail.none -/var/log/debug
|
||||
*.=info;*.=notice;*.=warning;\
|
||||
auth,authpriv.none;\
|
||||
cron,daemon.none;\
|
||||
mail,news.none -/var/log/messages
|
@ -111,11 +111,9 @@ start()
|
||||
|
||||
start-stop-daemon --start --quiet \
|
||||
--background \
|
||||
--exec ${command} \
|
||||
--startas /bin/sh \
|
||||
--pidfile ${pidfile} \
|
||||
--stderr "${DOCKER_LOGFILE}" \
|
||||
--stdout "${DOCKER_LOGFILE}" \
|
||||
-- --pidfile=${pidfile} ${DOCKER_OPTS}
|
||||
-- -c "exec ${command} --pidfile=${pidfile} ${DOCKER_OPTS} 2>&1 | logger -p local0.info"
|
||||
|
||||
ewaitfile 20 ${pidfile} /var/run/docker.sock /var/run/docker/libcontainerd/docker-containerd.sock
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user