[syslog-ng]Re: Thinking about linking
Wed, 26 Jun 2002 09:49:28 +0200
On 2002-06-26 06:25:05 AM syslog-ng-admin wrote:
> Message: 4
> Date: Tue, 25 Jun 2002 17:06:22 +0200
> From: Jay Goldberg <email@example.com>
> To: firstname.lastname@example.org
> Organization: Open Systems AG - http://www.open.ch
> Subject: [syslog-ng]Thinking about linking
> Reply-To: email@example.com
> Hi, syslog-ng'ers
> A quick question for all - I've been using syslog-ng, but instead of using
> the excellent built-in $YEAR $MONTH and $DAY macros for automatic logfile
> rotation, I've been using a different solution -
> I use the cronolog program (www.cronolog.org) as a destination for any files
> that I want to keep locally. It's not optimal, but it allows me to do one
> thing that keeps our complex management environment intact after the cutover
> from syslog to syslog-ng, and that's to maintain a symbolic link to the
> latest and previous logfiles in the place where folks/scripts would normally
> think to look for them. So for example:
> /reallybigdisk/logs/2002/06/messages.25 and
> would be today's and yesterdays 'messages' file. But with cronolog, I'm able
> to specify options so that /var/adm/messages is just a symlink to whatever file
> we're logging to now, and /var/adm/messages.0 is a symlink to whatever file
> we logged to last:
> host# ls -l /var/adm/messages*
> lrwxrwxrwx 1 root root 34 Jun 25 01:16 /var/adm/messages ->
> lrwxrwxrwx 1 root root 34 Jun 24 01:16 /var/adm/messages.0 ->
> I'm not sure if I missed this in the documentation for syslog-ng or perhaps
> I'm just insane for thinking that this is useful :)
> So I guess my questions after all this are:
> - did I miss this in the documentation?
> - am I insane for wanting such a feature?
> - would it be a lot of trouble to add this feature?
> ...I was thinking something along the lines of a 'maintain_symlink' option for
> a file destination that takes the target of the symlink (e.g.,
> as an option.
As far as I know (and I've probably been the last person looking over that code), there is no such option currently available.
It wouldn't be too hard to write, if and only if creating symlinks is portable over all UNIX implementations.
Being a Linux&Windows programmer only, I don't know for sure.
Anyway, following the lines of my latest patch (the "remove_if_older" patch, submitted Feb1 2002, included in 1.5.15),
it shouldn't be too difficult to implement.
I currently don't have time for it, but I think your suggestion makes sense and maybe I can persuade my boss to
give me some time to implement it.
Klaas van Gend