[Arakhnę-Dev] [61] Bug fix: the logging system listeners are not notified.

[ Thread Index | Date Index | More arakhne.org/dev Archives ]


Revision: 61
Author:   galland
Date:     2009-05-18 14:28:23 +0200 (Mon, 18 May 2009)

Log Message:
-----------
Bug fix: the logging system listeners are not notified.

Modified Paths:
--------------
    trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractLogger.java


Modified: trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractLogger.java
===================================================================
--- trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractLogger.java	2009-05-18 12:11:37 UTC (rev 60)
+++ trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractLogger.java	2009-05-18 12:28:23 UTC (rev 61)
@@ -195,13 +195,13 @@
 	 * @param exception is the exception associated to the message.
 	 */
 	protected final void fireLoggerEvent(LogLevel level, String message, Throwable exception) {
+		LoggerEvent event = new LoggerEvent(this, level, message, exception);
 		if (this.listeners!=null) {
-			LoggerEvent event = new LoggerEvent(this, level, message, exception);
 			for(LoggerEventListener listener : this.listeners) {
 				listener.onLoggedEvent(event);
 			}
-			LoggingSystem.getLoggingSystem().fireLoggerEvent(event);
 		}
+		LoggingSystem.getLoggingSystem().fireLoggerEvent(event);
 	}
 
 	/** {@InheritDoc}


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/