<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>rust &amp;mdash; Sebastian Wiesner</title>
    <link>https://swsnr.writeas.com/tag:rust</link>
    <description>System engineer for satellite mission planning. Gnome. Rust. Arch.  </description>
    <pubDate>Sat, 09 May 2026 12:25:03 +0000</pubDate>
    <image>
      <url>https://i.snap.as/9knB2j11.jpg</url>
      <title>rust &amp;mdash; Sebastian Wiesner</title>
      <link>https://swsnr.writeas.com/tag:rust</link>
    </image>
    <item>
      <title>logcontrol – an underappreciated systemd feature</title>
      <link>https://swsnr.writeas.com/logcontrol-an-underappreciated-systemd-feature?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[#systemd #rust&#xA;&#xA;Systemd has this feature which lets you change the log level of a service on the fly.  You can actually do this:&#xA;&#xA;$ sudo systemctl service-log-level systemd-resolved.service debug&#xA;$ resolvectl query some-funky-domain.example.com&#xA;$ sudo systemctl service-log-level systemd-resolved.service info&#xA;&#xA;to get a debug log of systemd-resolved trying to resolve a specific domain.&#xA;&#xA;This is backed by dbus: If a service listens on dbus and has its bus name defined in its unit file then it can expose the log control interface on its bus connection to let systemctl change its log level and log target.&#xA;&#xA;All of systemd&#39;s own services support this interface, but unfortunately it hasn&#39;t seen wide-spread adoption outside systemd yet.  Which is kinda sad, because it&#39;s really a great feature for debugging.&#xA;&#xA;I certainly plan to use it more, so I put up logcontrol.rs on crates.io.&#xA;&#xA;a href=&#34;https://remark.as/p/swsnr/logcontrol-an-underappreciated-systemd-feature&#34;Discuss.../a]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="https://swsnr.writeas.com/tag:systemd" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">systemd</span></a> <a href="https://swsnr.writeas.com/tag:rust" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">rust</span></a></p>

<p>Systemd has this feature which lets you change the log level of a service on the fly.  You can actually do this:</p>

<pre><code class="language-console">$ sudo systemctl service-log-level systemd-resolved.service debug
$ resolvectl query some-funky-domain.example.com
$ sudo systemctl service-log-level systemd-resolved.service info
</code></pre>

<p>to get a debug log of systemd-resolved trying to resolve a specific domain.</p>

<p>This is backed by dbus: If a service listens on dbus and has its bus name defined in its unit file then it can expose the <a href="https://www.freedesktop.org/software/systemd/man/latest/org.freedesktop.LogControl1.html" rel="nofollow">log control interface</a> on its bus connection to let systemctl change its log level and log target.</p>

<p>All of systemd&#39;s own services support this interface, but unfortunately it hasn&#39;t seen wide-spread adoption outside systemd yet.  Which is kinda sad, because it&#39;s really a great feature for debugging.</p>

<p>I certainly plan to use it more, so I put up <a href="https://github.com/swsnr/logcontrol.rs" rel="nofollow">logcontrol.rs</a> on crates.io.</p>

<p><a href="https://remark.as/p/swsnr/logcontrol-an-underappreciated-systemd-feature" rel="nofollow">Discuss...</a></p>
]]></content:encoded>
      <guid>https://swsnr.writeas.com/logcontrol-an-underappreciated-systemd-feature</guid>
      <pubDate>Wed, 25 Oct 2023 19:00:18 +0000</pubDate>
    </item>
  </channel>
</rss>