incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r580923 - /incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/TimedEventHandler.java
Date Mon, 01 Oct 2007 11:11:32 GMT
Author: cziegeler
Date: Mon Oct  1 04:11:31 2007
New Revision: 580923

URL: http://svn.apache.org/viewvc?rev=580923&view=rev
Log:
Add some debug messages when an event is scheduled.

Modified:
    incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/TimedEventHandler.java

Modified: incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/TimedEventHandler.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/TimedEventHandler.java?rev=580923&r1=580922&r2=580923&view=diff
==============================================================================
--- incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/TimedEventHandler.java
(original)
+++ incubator/sling/trunk/event/src/main/java/org/apache/sling/event/impl/TimedEventHandler.java
Mon Oct  1 04:11:31 2007
@@ -145,18 +145,30 @@
                 // first, check for expression
                 final String expression = (String) event.getProperty(EventUtil.PROPERTY_TIMED_EVENT_SCHEDULE);
                 if ( expression != null ) {
+                    if ( this.logger.isDebugEnabled() ) {
+                        this.logger.debug("Adding timed event " + config.get("topic") + "
with cron expression " + expression);
+                    }
                     this.scheduler.addJob(jobName, this, config, expression, false);
                 } else {
                     // check for period next
                     final Long period = (Long) event.getProperty(EventUtil.PROPERTY_TIMED_EVENT_PERIOD);
                     if ( period != null ) {
+                        if ( this.logger.isDebugEnabled() ) {
+                            this.logger.debug("Adding timed event " + config.get("topic")
+ " with period " + period);
+                        }
                         this.scheduler.addPeriodicJob(jobName, this, config, period, false);
                     } else {
                         // then we check for a fixed date
                         final Date date = (Date) event.getProperty(EventUtil.PROPERTY_TIMED_EVENT_DATE);
                         if ( date != null ) {
+                            if ( this.logger.isDebugEnabled() ) {
+                                this.logger.debug("Adding timed event " + config.get("topic")
+ " with date " + date);
+                            }
                             this.scheduler.fireJobAt(jobName, this, config, date);
                         } else {
+                            if ( this.logger.isDebugEnabled() ) {
+                                this.logger.debug("Firing timed event " + config.get("topic"));
+                            }
                             // no information, so fire the job once now
                             this.scheduler.fireJob(this, config);
                             return true;



Mime
View raw message