[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opennms-discuss
Subject:    Re: [opennms-discuss] OpenNMS log rotation
From:       Jesse White <jesse () opennms ! org>
Date:       2015-06-18 13:57:55
Message-ID: 5582CE63.90209 () opennms ! org
[Download RAW message or body]

Hi Giorgio,

On 06/18/2015 09:34 AM, Giorgio Biondi wrote:
> 
> I dont want ‘compress’ log file and want to leave only .1 archive.. but
> not have entry in logrotate..
> 
> My questions is : where or who ‘rotate’ opennms log file?

Log files are automatically rotated by our logging framework, log4j2.

To disable compression, edit $OPENNMS_HOME/etc/log4j2.xml.

You'll see a line with this form:

  filePattern="${logdir}/${ctx:prefix}.%i.log.gz">

Remove .gz from the file extension [1], changing it to:

  filePattern="${logdir}/${ctx:prefix}.%i.log">

Restarting the service is not required after making changes to this file.

-Jesse

[1]
https://logging.apache.org/log4j/2.x/manual/appenders.html#RolloverStrategies

------------------------------------------------------------------------------
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic