Изменения

Перейти к: навигация, поиск

Участник:VitaliyFilippov/Закладки

1357 байтов добавлено, 12:05, 17 февраля 2020
Добавлена закладка Add a log file driver for plaintext files · Issue #17020 · moby/moby
=== февраля 2020 ===
* 17 февраля, 15:05:57: [https://github.com/moby/moby/issues/17020 Add a log file driver for plaintext files · Issue #17020 · moby/moby]
*: <html><p>Thanks, but the syslog driver now does what I want.</p> <p>For the record and just in case someone also needs this, here's my setup on a Ubuntu system.</p> <p><strong><code>docker-compose.yml</code></strong></p> <pre><code> [...] log_driver: "syslog" log_options: tag: "web" </code></pre> <p><strong><code>/etc/rsyslog.d/30-docker-container</code></strong></p> <pre><code># Log docker messages to one file per container $template DockerFileName,"/var/log/docker/%syslogtag:R,ERE,1,DFLT:docker/(.*)\[--end%.log" # Log messages usually already contain a timestamp, so only log the raw message $template DockerLog,"%msg%\n" :syslogtag,startswith,"docker/" ?DockerFileName;DockerLog # Do not pollute default syslog with docker messages &amp; ~ </code></pre> <p><strong><code>/etc/logrotate.d/docker-container</code></strong></p> <pre><code>/var/log/docker/*.log { rotate 2 weekly missingok notifempty delaycompress compress postrotate reload rsyslog &gt;/dev/null 2&gt;&amp;1 || true endscript } </code></pre> <p>This gives me one logfile per container tag, for example <code>/var/log/docker/web.log</code>.</p></html>
<!-- NEXT BOOKMARK -->
* 09 февраля, 19:56:48: [https://www.youtube.com/watch?v=T_LgzBzNj48&feature=youtu.be Monster Island | Little Red Car Cartoons | Halloween Videos for Children by Kids Channel - YouTube]
* 06 февраля, 21:06:09: [https://adnauseam.io/ AdNauseam - Clicking Ads So You Don't Have To]

Навигация