[ 
https://issues.apache.org/jira/browse/KARAF-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13663865#comment-13663865
 ] 

Jean-Baptiste Onofré commented on KARAF-2238:
---------------------------------------------

I discussed with Guillaume about that.

1/ thanks for Pax Logging 1.7.0 (and the support of OSGi services 
"registration"), it's possible to create a logback appender that implement an 
interface provided by pax-logging, and register it as a service. This part 
should be documented.
2/ on the other hand, an interesting improvement can be added to pax-logging: a 
wrapper that implements the pax-logging interface using an existing appender.
                
> Logback appender
> ----------------
>
>                 Key: KARAF-2238
>                 URL: https://issues.apache.org/jira/browse/KARAF-2238
>             Project: Karaf
>          Issue Type: Improvement
>            Reporter: Keren Dong
>
> Can we have logback as the default logging implementation of 
> pax-logging-service and have a way to load custom appender?
> We want to create a log appender with custom threading control and found that 
> we can't with log4j 1.x (https://issues.apache.org/jira/browse/LOG4J2-3). 
> Karaf's pax-logging-service uses (slf4j+log4j), so we replaced 
> pax-logging-logback. But we find it difficult to do because 
> pax-logging-logback embeds Logback jars inside the bundle without exporting 
> packages and faced with osgi class loading issues. We can do it by defining 
> custom appender fragment for pax-logging-logback host at startup.properties 
> and set the org.ops4j.pax.logging.cfg for logback configuration. But we find 
> that is not convenient for development for having to copy updated Jars to 
> <kavaf_home>/system folder in every iteration.
> We are wondering if there is better way dynamically add the appender when we 
> install our bundle on a standard Karaf distribution?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to