Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docker [2020/12/29 02:09] – external edit 127.0.0.1 | docker [2022/01/31 11:28] (current) – tmaier | ||
|---|---|---|---|
| Line 61: | Line 61: | ||
| </ | </ | ||
| + | |||
| + | ===== Docker Logging ===== | ||
| + | ====== Logging with rsyslog ====== | ||
| + | / | ||
| + | < | ||
| + | # Docker config | ||
| + | $AddUnixListenSocket / | ||
| + | |||
| + | # syslogtag enthält noch PID | ||
| + | # programname nur appname/ | ||
| + | $template myFormat," | ||
| + | |||
| + | template( | ||
| + | name=" | ||
| + | type=" | ||
| + | string="/ | ||
| + | option.casesensitive=" | ||
| + | ) | ||
| + | |||
| + | # 23: local7 | ||
| + | if $syslogfacility == 23 then { | ||
| + | if $programname startswith " | ||
| + | action(name=" | ||
| + | } else { | ||
| + | action(name=" | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | / | ||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Restart rsyslog, the docker daemon and then all containers to switch to the new driver. Otherwise the docker daemon shows the following error message for the affected containers: " | ||