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

List:       opennms-discuss
Subject:    [opennms-discuss] R:  OpenNMS log rotation
From:       Giorgio Biondi <gbiondi () tech2 ! it>
Date:       2015-06-19 7:44:47
Message-ID: bab4fa0599f547f49f0ab1f2e797816e () tech2srv21 ! tech2 ! it
[Download RAW message or body]

Hi Jesse,

ok for compress.. and for leave only one file of archive? 
I want only .1 and not .2 .3 .4 archive..

All the best..

-----Messaggio originale-----
Da: Jesse White [mailto:jesse@opennms.org] 
Inviato: giovedì 18 giugno 2015 15:58
A: opennms-discuss@lists.sourceforge.net
Oggetto: Re: [opennms-discuss] OpenNMS log rotation

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

--
This message has been scanned for viruses and dangerous content by MailScanner, and \
is believed to be clean. MailScanner thanks transtec Computers for their support.


------------------------------------------------------------------------------
_______________________________________________
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