[slf4j-user] SLF4J implementation for Eclipse logging?

Eric Jain eric.jain at gmail.com
Wed Mar 25 00:30:17 CET 2009


I'd like to have code that uses the SLF4J API to use the logging
system built into Eclipse (when run in an Eclipse plug-in or an RCP
application). Delegating logging to Eclipse via a custom logger is
quite simple:

    public void error(String message, Throwable t) {
        ILog logger = Platform.getLog(Platform.getBundle(id));
        logger.log(new Status(IStatus.ERROR, id, message, t));
    }

What's the simplest way to create an SLF4J logger that delegates in
this manner (if such a thing doesn't exist already)? Copy-paste from
slf4j-simple?



More information about the slf4j-user mailing list