You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Matt Sicker <bo...@gmail.com> on 2016/05/05 22:27:15 UTC

How do you configure logger additivity with the log:tail console command?

I'm having additivity-related issues where if I enable additivity, certain
log messages will get output in the console, but get output twice in the
log file. If I disable additivity, then those log messages are no longer
duplicated in the file, but they're no longer output by log:tail.

I'm using Karaf 3.0.4. Example config:

log4j.rootLogger = INFO, out
log4j.logger.com.example = DEBUG, out
log4j.additivity.com.example = false

-- 
Matt Sicker <bo...@gmail.com>

Re: How do you configure logger additivity with the log:tail console command?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Matt,

log:* commands uses the sift appender.

Did you change the appenders (console, out and sift) ?

In your case, the log4j configuration doesn't look correct for me. In 
etc/org.ops4j.pax.logging.cfg you should have:

log4j.rootLogger=INFO, out, osgi:*

log4j.logger.com.example=DEBUG

You don't have to provide the appender on the com.example logger.

Regards
JB

On 05/06/2016 12:27 AM, Matt Sicker wrote:
> I'm having additivity-related issues where if I enable additivity,
> certain log messages will get output in the console, but get output
> twice in the log file. If I disable additivity, then those log messages
> are no longer duplicated in the file, but they're no longer output by
> log:tail.
>
> I'm using Karaf 3.0.4. Example config:
>
> log4j.rootLogger = INFO, out
> log4j.logger.com.example = DEBUG, out
> log4j.additivity.com.example = false
>
> --
> Matt Sicker <boards@gmail.com <ma...@gmail.com>>

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