<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Logging on Lead DevOps</title><link>https://lead-devops.blackdevhub.online/en/tags/logging/</link><description>Recent content in Logging on Lead DevOps</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Fri, 18 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://lead-devops.blackdevhub.online/en/tags/logging/index.xml" rel="self" type="application/rss+xml"/><item><title>Docker logs and journald: choosing a logging driver</title><link>https://lead-devops.blackdevhub.online/en/posts/docker-logs-i-journald/</link><pubDate>Fri, 18 Sep 2026 00:00:00 +0000</pubDate><guid>https://lead-devops.blackdevhub.online/en/posts/docker-logs-i-journald/</guid><description>&lt;p&gt;When a container crashes, logs are the first thing you need to see. &lt;code&gt;docker logs&lt;/code&gt; looks simple, but under the hood different logging drivers are at work, and the choice affects how logs are stored, rotated, and accessed. Here is what you should know before trusting the default.&lt;/p&gt;&#10;&lt;h2 id="how-docker-logs-works"&gt;How docker logs works&#10;&lt;/h2&gt;&#10;&lt;p&gt;The &lt;code&gt;docker logs &amp;lt;container&amp;gt;&lt;/code&gt; command reads the container&amp;rsquo;s stdout/stderr stream and outputs it to the terminal. Behind this sits a &lt;strong&gt;logging driver&lt;/strong&gt; — a component that determines where the data actually goes. By default it is &lt;code&gt;json-file&lt;/code&gt;: each container gets a JSON file on the host into which every output line is written.&lt;/p&gt;</description></item><item><title>logrotate for Custom Daemons</title><link>https://lead-devops.blackdevhub.online/en/posts/logrotate-custom-daemons/</link><pubDate>Tue, 08 Sep 2026 00:00:00 +0000</pubDate><guid>https://lead-devops.blackdevhub.online/en/posts/logrotate-custom-daemons/</guid><description>&lt;p&gt;Log rotation is missing for your daemon, the log file has grown to dozens of gigabytes, the disk is full, and monitoring is screaming. systemd-journald and syslog-ng rotate on their own, but if your custom daemon writes directly to a file, rotation falls to logrotate. Here is how to configure it for a specific service.&lt;/p&gt;&#10;&lt;h2 id="why-write-a-custom-logrotate-config"&gt;Why write a custom logrotate config&#10;&lt;/h2&gt;&#10;&lt;p&gt;Packages from the repository usually drop their config into &lt;code&gt;/etc/logrotate.d/&lt;/code&gt;, but for self-built daemons or those compiled from source, there is none. Without a config the file grows without limits. logrotate runs via a systemd timer (&lt;code&gt;logrotate.timer&lt;/code&gt;) or cron and reads all files from &lt;code&gt;/etc/logrotate.d/&lt;/code&gt;. Creating a single file is enough to start the rotation cycle.&lt;/p&gt;</description></item></channel></rss>