On Tue, Apr 5, 2011 at 23:43, mgardiner <gardin...@familysearch.org> wrote:
> Hi,
>
> Are there any examples available showing how to use custom log4j appenders
> under Karaf?  I see in the users guide the following note:
>
> "If you plan to use your own appenders, you need to create an OSGi bundle
> and attach it as a fragment to the bundle with a symbolic name of
> org.ops4j.pax.logging.pax-logging-service. This way, the underlying logging
> system will be able to see and use your appenders."
>
> We have a custom remoting logging appender we wish to utilize with our
> project hosted in Karaf 2.1.4.
>
> I am assuming we turn our appenders jar into a bundle with the fragment host
> set to org.ops4j.pax.logging.pax-logging-service and deployed with our
> project.  Is that correct?

Yep, that's correct.

>
> How do you recommend handling multiple log4j.xml files for each deployment
> environment such as development, staging, and production.
>

Good question.  We don't usually use xml files for log4j but rather
the configuration based ones.
Take a look at the etc/org.ops4j.pax.logging.cfg file which is
actually a log4j config file.
That file will be used to configure log4j, so you should only touch
that file and configure it
differently between your environments I think;

> Thanks.
>
> -Mike-
>
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/Using-custom-log4j-appenders-under-Karaf-2-1-4-tp2781811p2781811.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to