[syslog-ng] (U) [Non-DoD Source] Re: Rotate syslog-ng log files

Scheidler, Balázs balazs.scheidler at balabit.com
Thu May 31 09:47:44 UTC 2018


I mean syslog-ng 1.6.8

On May 30, 2018 22:54, "Balazs Scheidler" <bazsi77 at gmail.com> wrote:

> syslog-ng does have template support, it just doesnt support braces, which
> came later.
>
> Just write $YEAR instead of ${YEAR}
>
> On May 30, 2018 09:41, "Gergely Nagy" <algernon at balabit.com> wrote:
>
>> >>>>> "Amin" == Amin, Jitesh CTR DISA JSP (US) <jitesh.amin.ctr at mail.mil>
>> writes:
>>
>>     Amin> Let me ask this, with the following config = destination
>>     Amin> syslog { file("/var/log/syslog-${YEAR}-${MONTH}-${DAY}.log");
>>     Amin> };
>>
>>     Amin> It created new file and started writing to it (versus creating
>>     Amin> new syslog.log). Question, if we plan to accept this for now,
>>     Amin> with above config, would it create a new file ever day with
>>     Amin> following file names or no it would not work with v1.6.8
>>
>> With syslog-ng 1.6.8, it would not create a new file every day, and
>> would continue writing to syslog-{YEAR}-{MONTH}-{DAY}.log. With newer
>> versions, it would create files like `syslog-2018-05-30.log`. No `.0`,
>> `.1` or the like would be appended. That's a convention of logrotate.
>> With syslog-ng, you get filenames that match the template, they will
>> have nothing appended or prepended that is not in the filename template.
>>
>> --
>> |8]
>> ____________________________________________________________
>> __________________
>> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
>> Documentation: http://www.balabit.com/support/documentation/?product=
>> syslog-ng
>> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
>>
>>
> ____________________________________________________________
> __________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?
> product=syslog-ng
> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20180531/1fc699ae/attachment.html>


More information about the syslog-ng mailing list