Thanks once again.

I tried your suggestion with the following changes in
etc/org.ops4j.pax.logging.cfg

# Root logger
log4j.rootLogger=INFO, out, osgi:VmLogAppender

# File appender
# log4j.appender.out=org.apache.log4j.FileAppender
log4j.appender.out=org.apache.log4j.RollingFileAppender 
log4j.appender.out.MaxFileSize=100KB
log4j.appender.out.MaxBackupIndex=10
# log4j.appender.out=org.apache.log4j.DailyRollingFileAppender

log4j.appender.out.layout=org.apache.log4j.PatternLayout
log4j.appender.out.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t
| %-32.32c{1} | %-32.32C %4L | %m%n
log4j.appender.out.file=${karaf.base}/data/log/karaf.log
log4j.appender.out.append=true

I monitored my karaf.log and it did not stop when it reached 100kb. (even
though I restarted karaf after the changes - I even deleted the old log)


Any ideas?


lhein wrote:
> 
> Have a look at http://logging.apache.org/log4j/1.2/manual.html
> 
> There are some example configurations for different appenders. An
> example for the RollingFileAppender is also there.
> 
> Regards
> Lars
> 
> 
> 2010/5/11 lekkie <[email protected]>:
>>
>> Thanks.
>>
>> Can you point me to the documentation?
>>
>> I will also like to configure max file size, and if possible number of
>> log
>> files keep-able?
>>
>> regards.
>>
>>
>> Jean-Baptiste Onofré wrote:
>>>
>>> Change to a RollingFileAppender in etc/org.ops4j.logging....
>>> ------Original Message------
>>> From: lekkie
>>> To: [email protected]
>>> ReplyTo: [email protected]
>>> Subject: Rotating karaf log
>>> Sent: May 11, 2010 11:48
>>>
>>>
>>> How can I ensure karaf.log is rotated?
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Rotating-karaf-log-tp28522041p28522041.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Rotating-karaf-log-tp28522041p28522246.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> http://lhein.blogspot.com
> 
> 
> -----
> Regards 
> Lars 
> 
> 
> http://lhein.blogspot.com 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Rotating-karaf-log-tp28522041p28526589.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to