Re: [PATCH] svlogd: implement option to use alternate config file

From: Jan Braun <janbraun_at_gmx.de>
Date: Thu, 1 Aug 2019 08:43:36 +0200

Patrick Steinhardt schrob:
> Yeah, I thought about using a symlink here, too. The main reason
> why I didn't want to do this is to keep configuration and data
> separate from each other. It honestly feels a bit weird to me to
> configure the logger in /var/log/$service -- doing so in
> /etc/sv/$service/log seems like the more obvious location to me
> and can be cleanly achieved with this new option without
> requiring a symlink.

I agree it feels weird. I expect to be able to rm -r /var/log/$foo
to get rid of logs, without accidentally losing configuration.

My standardized log/run script thus contains (among other things):

| if [ -e main-config ] && [ ! -e main/config ] ; then
| ln -s "`realpath main-config`" main/config
| fi

I think that's a simpler (and therefore better) way to move the config
location than extending svlogd's C code.

And I likely will s/main/$i/g and put a
| for i in main foo bar ; do
| ...
| done
loop around that code once I need several logdirs with individual
configuration. I don't see how your -c option would achieve that.

regards,
    Jan



Received on Thu Aug 01 2019 - 06:43:36 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC