Author: rahul
Date: Wed Dec 13 14:11:14 2006
New Revision: 486858

URL: http://svn.apache.org/viewvc?view=rev&rev=486858
Log:
Logging improvements.

Modified:
    
jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java

Modified: 
jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java?view=diff&rev=486858&r1=486857&r2=486858
==============================================================================
--- 
jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java
 (original)
+++ 
jakarta/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java
 Wed Dec 13 14:11:14 2006
@@ -323,13 +323,20 @@
             if (SCXMLHelper.isStringEmpty(targetValue)) {
                 // TODO: Remove both short-circuit passes in v1.0
                 if (wait == 0L) {
+                    if (appLog.isDebugEnabled()) {
+                        appLog.debug("<send>: Enqueued event '" + event
+                            + "' with no delay");
+                    }
                     derivedEvents.add(new TriggerEvent(event,
                         TriggerEvent.SIGNAL_EVENT));
                     return;
                 }
             } else {
                 // We know of no other
-                appLog.warn("<send>: Unavailable target - " + target);
+                if (appLog.isWarnEnabled()) {
+                    appLog.warn("<send>: Unavailable target - "
+                        + targetValue);
+                }
                 derivedEvents.add(new TriggerEvent(
                     EVENT_ERR_SEND_TARGETUNAVAILABLE,
                     TriggerEvent.ERROR_EVENT));
@@ -338,6 +345,12 @@
             }
         }
         ctx.setLocal(getNamespacesKey(), null);
+        if (appLog.isDebugEnabled()) {
+            appLog.debug("<send>: Dispatching event '" + event
+                + "' to target '" + targetValue + "' of target type '"
+                + targettypeValue + "' with suggested delay of " + wait
+                + "ms");
+        }
         // Else, let the EventDispatcher take care of it
         evtDispatcher.send(sendid, targetValue, targettypeValue, event,
             params, hintsValue, wait, externalNodes);



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to