You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Oz <co...@iioii.org> on 2019/03/11 10:11:58 UTC

Log Rotation

Greetings fellow Archiva users!

I have installed Archiva on Ubuntu 18.04, it is a standalone installation with a separate base directory as described in this page: http://archiva.apache.org/docs/2.2.3/adminguide/standalone.html
This is all working well.

We have a corporate log retention policy and we use Linux logrotate to implement consistent log rotation all log files.
 
I would like to customize the logging, specifically the log file name and disable log rotation.  I would like to disable log file rotation by Archiva/log4j2 and use Linux logrotate.  

It appears that the Archiva web application has its own log4j2 configuration file in the directory:
apps/archiva/WEB-INF/classes/log4j2.xml

Is it advisable to modify this configuration file or should I create my own log4j2 configuration file in ARCHIVA_BASE/conf/ directory?

Then specify this configuration file in the wrapper.conf using the following method:
wrapper.java.additional.x=-Dlog4j.configurationFile=%ARCHIVA_BASE%/conf/myLog4j2.xml


Will this work?  Any advise will be greatly appreciated.

Thanks
Oz

Re: Log Rotation

Posted by Olivier Lamy <ol...@apache.org>.
On Mon, 11 Mar 2019 at 21:32, Oz <co...@iioii.org> wrote:

> Greetings fellow Archiva users!
>
> I have installed Archiva on Ubuntu 18.04, it is a standalone installation
> with a separate base directory as described in this page:
> http://archiva.apache.org/docs/2.2.3/adminguide/standalone.html
> This is all working well.
>
> We have a corporate log retention policy and we use Linux logrotate to
> implement consistent log rotation all log files.
>
> I would like to customize the logging, specifically the log file name and
> disable log rotation.  I would like to disable log file rotation by
> Archiva/log4j2 and use Linux logrotate.
>
> It appears that the Archiva web application has its own log4j2
> configuration file in the directory:
> apps/archiva/WEB-INF/classes/log4j2.xml
>
> Is it advisable to modify this configuration file or should I create my
> own log4j2 configuration file in ARCHIVA_BASE/conf/ directory?
>
> Then specify this configuration file in the wrapper.conf using the
> following method:
>
> wrapper.java.additional.x=-Dlog4j.configurationFile=%ARCHIVA_BASE%/conf/myLog4j2.xml
>
>
> Will this work?  Any advise will be greatly appreciated.
>

I guess yes


>
> Thanks
> Oz
>


-- 
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy