Ludovic Bellière via Dng said on Mon, 15 Sep 2025 09:08:53 +0000
>Example content of the log/run file:
>
>--8<---------------cut here---------------start------------->8---
>#!/bin/sh
>
>[ -r ../conf ] && . ../conf
>
>if [ "${LOGGING_ENABLE}x" = "1x" ]; then
> # Create the log directory if not exists.
> [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}"
>
> exec svlogd -tt "${LOG_DIR:-}"
>else
> exec chpst -b mpd-log-null cat >/dev/null
>fi
>--8<---------------cut here---------------end--------------->8---
>
>This snipped has for effect to enable logging if the service is
>configured for it. Otherwise, it logs to null. Thus, for logging
>purposes, I created a `/var/log/user.s/@USERNAME@/' directory with the
>user's ownership, and directed runit to log there through `LOG_DIR'.
Hi Ludovic (and everyone else),
I'd like thoughts on the locations of the logs for a personal runit...
The 00's were a long time ago, but in the 00's I ran daemontools
instead of runit. With daemontools, the default location of the log
file was either in the log directory, or in a directory lower than
that. I kind of liked that, because each runit-supervised daemon had a
distinct directory in which to place the logs.
So right now, my log directory for the newtest "hello world" daemon is
/home/slitt/service_gui/log/logs . On one hand, I can always find the
log because it's obvious where it is. But on the other hand, that's
five directories deep.
Your `/var/log/user.s/@USERNAME@/' directory is an interesting idea,
although I'd have `/var/log/user.s/@USERNAME@/@DAEMONNAME@/' so each
daemon gets its own directory. I'd get rid of all the @ characters too.
Does anyone else have ideas about the location of the logs? I'd like
to have an other peoples' opinion before I make the logging system and
then document it on the web page.
Thanks,
SteveT
Steve Litt
http://444domains.com