You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2014/10/23 13:18:10 UTC
svn commit: r1633790 -
/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/deprecated/EventAdminBridge.java
Author: cziegeler
Date: Thu Oct 23 11:18:10 2014
New Revision: 1633790
URL: http://svn.apache.org/r1633790
Log:
Clean up logging
Modified:
sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/deprecated/EventAdminBridge.java
Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/deprecated/EventAdminBridge.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/deprecated/EventAdminBridge.java?rev=1633790&r1=1633789&r2=1633790&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/deprecated/EventAdminBridge.java (original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/deprecated/EventAdminBridge.java Thu Oct 23 11:18:10 2014
@@ -105,9 +105,8 @@ public class EventAdminBridge
this.writeQueue.put(new Event("deactivate", (Dictionary<String, Object>)null));
} catch (final InterruptedException e) {
Thread.currentThread().interrupt();
- this.ignoreException(e);
}
- logger.info("Apache Sling Job Event Bridge stopped on instance {}", Environment.APPLICATION_ID);
+ logger.debug("Apache Sling Job Event Bridge stopped on instance {}", Environment.APPLICATION_ID);
}
@@ -115,7 +114,7 @@ public class EventAdminBridge
* Background thread adding jobs received as events
*/
private void addJobs() {
- logger.info("Apache Sling Job Event Bridge started on instance {}", Environment.APPLICATION_ID);
+ logger.debug("Apache Sling Job Event Bridge started on instance {}", Environment.APPLICATION_ID);
try {
this.processWriteQueue();
} catch (final Throwable t) { //NOSONAR
@@ -143,7 +142,6 @@ public class EventAdminBridge
try {
event = this.writeQueue.take();
} catch (final InterruptedException e) {
- this.ignoreException(e);
Thread.currentThread().interrupt();
this.running = false;
}
@@ -154,7 +152,6 @@ public class EventAdminBridge
this.writeQueue.put(event);
Thread.sleep(500);
} catch (final InterruptedException ie) {
- this.ignoreException(ie);
Thread.currentThread().interrupt();
this.running = false;
}
@@ -188,16 +185,13 @@ public class EventAdminBridge
}
// we ignore remote job events
if ( EventUtil.isLocal(event) ) {
- if ( logger.isDebugEnabled() ) {
- logger.debug("Handling local job {}", EventUtil.toString(event));
- }
+ logger.info("Received job via deprecated OSGi event {}", EventUtil.toString(event));
// check job topic
final String errorMessage = Utility.checkJobTopic(event.getProperty(ResourceHelper.PROPERTY_JOB_TOPIC));
if ( errorMessage == null ) {
try {
this.writeQueue.put(event);
} catch (final InterruptedException e) {
- this.ignoreException(e);
Thread.currentThread().interrupt();
}
} else {
@@ -206,16 +200,6 @@ public class EventAdminBridge
}
}
- /**
- * Helper method which just logs the exception in debug mode.
- * @param e
- */
- private void ignoreException(final Exception e) {
- if ( this.logger.isDebugEnabled() ) {
- this.logger.debug("Ignored exception " + e.getMessage(), e);
- }
- }
-
@Override
public JobResult process(final Job job) {
// this is never been called, but we return something anyway