/**
 * Copyright 2011, Stanford University. This file is licensed under GPL v2 plus
 * a special exception, as described in included LICENSE_EXCEPTION.txt.
 */
package net.beaconcontroller.logging.bridge;

import org.osgi.service.log.LogEntry;
import org.osgi.service.log.LogListener;
import org.osgi.service.log.LogService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author David Erickson (daviderickson@cs.stanford.edu)
 */
public class SLF4JLogListener implements LogListener {
    private static Logger log = LoggerFactory.getLogger(SLF4JLogListener.class);

    public void logged(LogEntry entry) {
        if (entry.getBundle() != null) {
            log = LoggerFactory.getLogger(entry.getBundle().getSymbolicName()
                    + "-" + entry.getBundle().getVersion().toString());
        }

        switch (entry.getLevel()) {
            case LogService.LOG_DEBUG:
                log.debug(entry.getMessage(), entry.getException());
                break;
            case LogService.LOG_ERROR:
                log.error(entry.getMessage(), entry.getException());
                break;
            case LogService.LOG_INFO:
                log.info(entry.getMessage(), entry.getException());
                break;
            case LogService.LOG_WARNING:
                log.warn(entry.getMessage(), entry.getException());
                break;
        }
    }
}

@@ -627,210 +627,8 @@
 ) %7B%0A
-        if (entry.getBundle() != null) %7B%0A            log = LoggerFactory.getLogger(entry.getBundle().getSymbolicName()%0A                    + %22-%22 + entry.getBundle().getVersion().toString());%0A        %7D%0A%0A
     

Use SLF4JLogListener as the logger name