Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [soc-dev] GSoC 2014 - Implement an SLF4J-based Logging Center for Eclipse


Hi Marcel,

I have read about the OSGi framework and have implemented some simple OSGi apps. Firstly, I implemented a simple bundle and service app by following Lars's tutorial. Then, I implemented separate bundles with activator for all the logging frameworks (log4j, jcl, jul and slf4j) as per the project structure in the snapshot given by you. I executed them both through OSGi in eclipse and through the OSGi console in shell.

Lastly, I converted my previous plain Java slf4j bridge system into a simple eclipse Plug-in. Currently, I am bundling all the bridge libraries with the Plug-in itself as I couldn't find the required dependencies. But, I know that this will break modularity and needs to be changed. I am currently working on it. Please, let me know if I am heading in the right direction or not.

Also, I would like to suggest an enhancement. In the log view, we can give sorting, searching and filtering options based on log levels, log message text, log tag(class name, thread name) etc. I think this facility is not available right now. Please correct me if I am wrong.



On Thu, Mar 6, 2014 at 9:51 PM, Marcel Bruch <marcel.bruch@xxxxxxxxxxxxxx> wrote:
Hi Ashwin,
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




Am 04.03.2014 um 21:42 schrieb Ashwin Jha <ajha.dev@xxxxxxxxx>:


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. 
You can view the current code base at: https://github.com/ashwinj/LogCenter

Regards,
Ashwin



Hi Marcel,
I've just played with SLF4J's bridging APIs - simple app that logs
info via different logging frameworks and played with Maven's
dependencies to bind different underlying loggin frameworks. I've also
played with the SLF4J's migration app to see how it works - if that's
what you've meant with running few experiments. If there's anything
else you want me to do just let me know.


Back to the top