[syslog-ng] RE : How do I force syslog-ng to create an empty log file ??

Joerg Michels michels at teamnet.de
Wed Sep 7 15:25:42 CEST 2005


Hi Gerdard,

you can use logger cron job to create specific syslog messages like

$ logger -p auth.info foobar
or
$ logger -p err foobar

but that will not create empty files.


Why you don't simply touch the files per cron job?



Jörg


On Wed, 7 Sep 2005 13:48:17 +0100
"Eggart, Gerhard" <geggart at emea.att.com> wrote:

> Hi,
> 
> 
> We are currently using syslog-ng (syslog-ng 1.6.0rc4) to log for local log messages on a device.
> We have the following in the config file to store local auth messages.
> 
> destination local_auth  { file("/var/log/local/auth.$YEAR$MONTH$DAY"); };
> 
> We have the following in the config file to store local error messages.
> 
> destination local_err   { file("/var/log/local/errors.$YEAR$MONTH$DAY"); };
> 
> The problem I have is that sometimes for a day there are no error or auth messages and because of this the log file is not generated, a log file is only created if there is log data to put into it.
> 
> I require syslog-ng to force the creation of a log file for the day even if it is empty.
> 
> I have also just tried the stats(600) option in the configuration and stopped and started the dameon and this does not write any information to a log file - therefore no errors log file is created for the day.
> 
> 
> Does anyone know if this can be done on syslog-ng ???
> 
> Thanks 
> 
> 
> > Gerhard Eggart
> > 
> > 
> > 
> _______________________________________________
> syslog-ng maillist  -  syslog-ng at lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
> 


-- 
Joerg Michels         
                                
teamnet GmbH            Voice  +49 5251 879293 30 
Technologiepark 20      Fax    +49 5251 879293 99
D-33100 Paderborn       EMail  michels at teamnet.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.balabit.hu/pipermail/syslog-ng/attachments/20050907/31e8fdb4/attachment.pgp


More information about the syslog-ng mailing list