[syslog-ng]persistent link to current file

Nate Campi syslog-ng@lists.balabit.hu
Tue, 13 Jan 2004 12:09:11 -0800


On Tue, Jan 13, 2004 at 01:39:20PM -0500, Gainey, Joe (AT-Atlanta) wrote:
> Is there any way to link the current version of a file to a standard
> location.  If not would it be possible to add this functionality.  Here is
> an example of what i have:
> 
> destination d_default {
>    file("/var/adm/messages.$YEAR.$MONTH.$DAY") ;
> } ;
> 
> 
> However, I have to recreate the symlink in cron every day:
> 
> ln -s /var/adm/messages.2004.01.13 /var/adm/messages
> 
> it would be nice if there was an option:
> 
> destination d_default {
>    file("/var/adm/messages.$YEAR.$MONTH.$DAY"
> soft_link("/var/adm/messages")) ;
> } ;
 

Unless you have too little space to do it this way, I'd log to both: an
archive and also /var/log/messages. Just rotate /var/log/messages every
day with logrotate (or whatever) and you're set.
-- 
Nate

Only through hard work and perseverance can one truly suffer.