Hi Ashwin.

If I understand correctly, you’re seeking to write an SLF4j backend that will 
shunt all messages from the different SLF4j facades through an appropriate E4 
logger?  

The E4 Logger is itself a facade.  There’s an ILoggerProvider which is intended 
to act like the SLF4j LoggerFactory: provide a logger for a particular class.  
The app can provide a different ILoggerProvider than the DefaultLoggerProvider 
that is installed by default, that just logs using the Equinox/OSGi logger.

My 2¢: I think you should reconsider your approach.  Instead of shunting to the 
E4 Logger, use SLF4j (SLF4j’s markers and MDC are very powerful) and use one of 
the existing SLF4j backends.  Provide your own ILoggerProvider that just wraps 
the SLF4j Logger.  With Logback or Log4j, you can write an appender that can 
send log messages back to the Equinox FrameworkLog if it’s important to have 
messages go through the Eclipse logging mechanism (i.e., to show up in the 
Error Log view).

Brian.

On 6-Jun-2014, at 6:19 AM, Ashwin Jha <[email protected]> wrote:

> Hi,
> 
> I am implementing a Eclipse E4 Logger based binding for SLF4J.
> I wanted to know how to access the Logger instance as my 
> implementation will be a fragment hosted by the org.slf4j.api bundle.
> 
> 
> Thanks,
> Ashwin
> _______________________________________________
> e4-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/e4-dev

_______________________________________________
e4-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/e4-dev

Reply via email to