karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: custom log file size not restricted
Date Wed, 13 Dec 2017 13:11:52 GMT
Hi,

your configuration looks good to me.

Yes, please try to remove extra space first.

By the way, what's the Karaf version (I guess 4.0.x regarding your cfg file) ?
As reminder, Karaf 4.0.x uses log4j 1.x configuration style, and from Karaf 
4.1.x, we are using log4j 2.x style.

Regards
JB

On 12/13/2017 12:42 PM, jyothi wrote:
> Hi JB,
> 
> Thanks for the quick response!!
> 
> Regarding spaces, that is generated one using config:property-append from
> Karaf console. I will try to remove spaces and check if it works!!
> 
> Please find my complete pax logging config and I didn't added anything to
> rootLogger. Do I need to add custom to the log4j.rootLogger?
> 
> # Root logger
> log4j.rootLogger = INFO, out, osgi:*
> log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
> 
> # Security audit logger
> log4j.logger.org.apache.karaf.jaas.modules.audit=INFO, audit
> log4j.additivity.org.apache.karaf.jaas.modules.audit=false
> 
> # CONSOLE appender not used by default
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p |
> %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} -
> %X{bundle.version} | %m%n
> 
> # File appender
> log4j.appender.out=org.apache.log4j.RollingFileAppender
> log4j.appender.out.layout=org.apache.log4j.PatternLayout
> log4j.appender.out.layout.ConversionPattern = %d{ISO8601} | %-5.5p | %t |
> %c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
> log4j.appender.out.file=${karaf.data}/log/karaf.log
> log4j.appender.out.append=true
> log4j.appender.out.maxFileSize=1MB
> log4j.appender.out.maxBackupIndex=10
> 
> 
> log4j.appender.custom = org.apache.log4j.RollingFileAppender
> log4j.appender.custom.append = true
> log4j.appender.custom.file = ${karaf.data}/log/userLog.log
> log4j.appender.custom.layout = org.apache.log4j.PatternLayout
> log4j.appender.custom.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss Z} |
> %-5.5p | %t | %c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} |
> %m%n
> log4j.appender.custom.maxBackupIndex = 10
> log4j.appender.custom.maxFileSize = 1MB
> 
> log4j.logger.com.globalhealth.referralnet.agent.exception = INFO,custom
> log4j.logger.com.globalhealth.referralnet.agent.logger = INFO,custom
> log4j.logger.com.globalhealth.referralnet.agent.upgrade.impl.RNAUpgradeUserLogger
> = INFO,custom
> 
> 
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message