Hi Pawel,
looks like you both got the slf4j logging bridges working in a plain java world. Good!
The next step would be to learn a bit more about OSGI and run these bridges in, say, 3 different OSGI bundles.
I’ve attached a screenshot of my current workspace which contains the experimental code I wrote to see whether what I want you to do actually works ;-). Feel free to follow the structure you see there.
Running your logging code in an OSGI environment is the tricky part. You now have to learn about bundles, manifests, and the OSGI runtime, which requires you to spent some time on reading tutorials (e.g. by Lars or from
eclipse.org/articles) etc.
As a good start, you may create a simple bundle with just an Activator.java in it. Then start the osgi runtime, and start your bundle from the command line in there. Make sure you create a few system.out.println() in your Activator#start method and set a few breakpoints.
Let me know when you are mastering the osgi console and can start and stop your bundles from inside the shell. Then we are ready for the next steps ;)
Best,
Marcel
Hi Marcel,
Thanks for your reply. As per your reply, I have tried to implement a system that bridges log4j, java util logging and apache common logging APIs to logback using
slf4j. Apart from a few issues with the java util API everything is working fine.
But, I wasn't able to implement it as a plugin.
I mean to say, I am not getting the idea of how to implement it as a plugin.
Can you help me with this?
Current system uses different threads to log a set of instructions for each of the APIs.