Logging Bridge need to show the source of the OSGi Log events
[controller.git] / opendaylight / logging / bridge / src / main / java / org / opendaylight / controller / logging / bridge / internal / LogListenerImpl.java
index d3c72b9..03719d5 100644 (file)
@@ -26,16 +26,20 @@ public class LogListenerImpl implements LogListener {
         if (this.logger != null) {
             switch (entry.getLevel()) {
             case LogService.LOG_DEBUG:
-                this.logger.debug(entry.getMessage());
+                this.logger.debug("Bundle:{} Message:{} Exception:{}", entry.getBundle()
+                        .getSymbolicName(), entry.getMessage(), entry.getException());
                 break;
             case LogService.LOG_INFO:
-                this.logger.info(entry.getMessage());
+                this.logger.info("Bundle:{} Message:{} Exception:{}", entry.getBundle()
+                        .getSymbolicName(), entry.getMessage(), entry.getException());
                 break;
             case LogService.LOG_WARNING:
-                this.logger.warn(entry.getMessage());
+                this.logger.warn("Bundle:{} Message:{} Exception:{}", entry.getBundle()
+                        .getSymbolicName(), entry.getMessage(), entry.getException());
                 break;
             case LogService.LOG_ERROR:
-                this.logger.error(entry.getMessage());
+                this.logger.error("Bundle:{} Message:{} Exception:{}", entry.getBundle()
+                        .getSymbolicName(), entry.getMessage(), entry.getException());
                 break;
             }
         }