[syslog-ng] clearing log files

Worsham, Michael mworsham at SCIRES.COM
Wed Nov 10 19:06:23 CET 2010


This is what I am using for my /etc/logrotate.d/syslog-ng script. Feel free to alter as needed.

/var/log/syslog/apache/*/*.log
/var/log/syslog/general/*/*.log
/var/log/syslog/weblogic/*/*.log
{
    missingok
    create 644 root root
    notifempty
    copytruncate
    compress
    rotate 1
}

________________________________________
From: syslog-ng-bounces at lists.balabit.hu [syslog-ng-bounces at lists.balabit.hu] On Behalf Of Gergely Nagy [algernon at madhouse-project.org]
Sent: Wednesday, November 10, 2010 12:58 PM
To: Syslog-ng users' and developers' mailing list
Subject: Re: [syslog-ng] clearing log files

> Actually this wont solve it, syslog-ng wont overwrite logs, it will only
> append to them.

You're correct - overwrite_if_older() is also needed (the admin docs
even list simple log rotation as an example when talking about this
option).
______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.campin.net/syslog-ng/faq.html

CONFIDENTIALITY NOTICE:  This email and any attachments are intended solely for the use of the named recipient(s).  This email may contain confidential and/or proprietary information of Scientific Research Corporation.  If you are not a named recipient, you are prohibited from reviewing, copying, using, disclosing or distributing to others the information in this email and attachments.  If you believe you have received this email in error, please notify the sender immediately and permanently delete the email, any attachments, and all copies thereof from any drives or storage media and destroy any printouts of the email or attachments.

EXPORT COMPLIANCE NOTICE:  This email and any attachments may contain technical data subject to U.S export restrictions under the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR).  Export or transfer of this technical data and/or related information to any foreign person(s) or entity(ies), either within the U.S. or outside of the U.S., may require advance export authorization by the appropriate U.S. Government agency prior to export or transfer.  In addition, technical data may not be exported or transferred to certain countries or specified designated nationals identified by U.S. embargo controls without prior export authorization.  By accepting this email and any attachments, all recipients confirm that they understand and will comply with all applicable ITAR, EAR and embargo compliance requirements.


More information about the syslog-ng mailing list