Re: Best place for per-daemon log files?

From: Colin Booth <colin_at_heliocat.net>
Date: Wed, 17 Sep 2025 18:19:23 +0000

On Wed, Sep 17, 2025 at 01:09:20PM -0500, J. Lewis Muir wrote:
> On 09/17, Colin Booth wrote:
> > The most "unix normal" approach would be /var/log/USER/SERVICE and the
> > most "it really only matters to the user" would be something under
> > $HOME. All other approaches are situationally viable at best and have
> > really nasty downsides if you don't manage them correctly.
>
> Hi, Colin!
>
> The only thing about /var/log/USER/SERVICE that I'm a little uneasy
> about is that it's not namespaced under /var/log. So, if USER were
> the same as a file or directory already there (e.g., samba or wtmp),
> then it breaks. What about namespacing it like /run/user/USER, so
> /var/log/user/USER/SERVICE? Of course, if /var/log/USER is already
> a standard, then I wouldn't want to go against it, but if it's not a
> standard, then I wonder if namespacing it would be better.
>
Seems reasonable to me. The only reason I didn't think of that is
because I don't have any user name / service name collisions and I'm not
a huge fan of additional depth for just-in-case issues. It's fine for
XDG_RUNTIME_DIR because that's not something people are expected to look
in or care about (it's a scratch space for temp data and meet-me stuff
with a well known name) but for users that extra encapsulation might be
annoying. I really don't know though.

-- 
Colin Booth
Received on Wed Sep 17 2025 - 20:19:23 CEST

This archive was generated by hypermail 2.4.0 : Wed Sep 17 2025 - 20:19:52 CEST