OSGI Pax logging

968 views Asked by At

I want to write a custom appender which will collect all the logs coming to Fuse.log in Fuse container and relay them over Scribe to a central log store. I want to add a event listener for that in the container. But I couldn't figure out how I can do that. I went through the PAX logging code. But couldn't figure out. Any suggestions greatly appreciated.

2

There are 2 answers

2
Achim Nierbeck On BEST ANSWER

I wrote once a blog post about this, it can be found at my blog. Basically you just need to create your appender, the tricky part is in adding it to pax-logging in the container via a fragment bundle.

0
Sheena Artrip On

pax logging just uses log4j as the implementation. So I would write a log4j appender to do this instead. here is a library which does this already, but I've never touched it. https://code.google.com/p/scribe-log4j/