Hi Steinar,

yes, you can rotate by configuration in etc/org.ops4j.pax.logging.cfg.

By configuration, the rotation is set to 16MB:

# Rolling file appender
log4j2.appender.rolling.type = RollingRandomAccessFile
log4j2.appender.rolling.name = RollingFile
log4j2.appender.rolling.fileName = ${karaf.log}/karaf.log
log4j2.appender.rolling.filePattern = ${karaf.log}/karaf.log.%i
# uncomment to not force a disk flush
#log4j2.appender.rolling.immediateFlush = false
log4j2.appender.rolling.append = true
log4j2.appender.rolling.layout.type = PatternLayout
log4j2.appender.rolling.layout.pattern = ${log4j2.pattern}
log4j2.appender.rolling.policies.type = Policies
log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.rolling.policies.size.size = 16MB


Just change the rolling.policies.size.size to the rotation you want.

Regards
JB

On 16/05/2019 17:51, Steinar Bang wrote:
> I have a 14MB karaf.log file on my production server and emacs think
> that is large and complains every time I open it.
> 
> Is there some configuration in karaf that can make it rotate the
> karaf.log file?  Is there a way karaf.log can be rotated by the OS?
> 
> Thanks!
> 
> 
> - Steinar
> 

-- 
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to