Browse files

Add explanatory comments to previous commit.

git-svn-id: https://svn.apache.org/repos/asf/aries/trunk@1296994 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent fe0a29e commit 3ec4774d156bd46b4a590d227707b72313e8b24a @bosschaert bosschaert committed Mar 5, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 jndi/jndi-core/src/main/java/org/apache/aries/jndi/startup/Activator.java
View
4 jndi/jndi-core/src/main/java/org/apache/aries/jndi/startup/Activator.java
@@ -78,6 +78,8 @@ public void start(BundleContext context) {
} catch (NamingException e) {
LOGGER.info(Utils.MESSAGES.getMessage("unable.to.set.static.ICFB"), e);
} catch (IllegalStateException e) {
+ // Log the problem at info level, but only log the exception at debug level, as in many cases this is not a real issue and people
+ // don't want to see stack traces at info level when everything it working as expected.
LOGGER.info(Utils.MESSAGES.getMessage("unable.to.set.static.ICFB.already.exists", getClassName(InitialContextFactoryBuilder.class)));
LOGGER.debug(Utils.MESSAGES.getMessage("unable.to.set.static.ICFB.already.exists", getClassName(InitialContextFactoryBuilder.class)), e);
}
@@ -89,6 +91,8 @@ public void start(BundleContext context) {
} catch (NamingException e) {
LOGGER.info(Utils.MESSAGES.getMessage("unable.to.set.static.OFB"), e);
} catch (IllegalStateException e) {
+ // Log the problem at info level, but only log the exception at debug level, as in many cases this is not a real issue and people
+ // don't want to see stack traces at info level when everything it working as expected.
LOGGER.info(Utils.MESSAGES.getMessage("unable.to.set.static.OFB.already.exists", getClassName(InitialContextFactoryBuilder.class)));
LOGGER.debug(Utils.MESSAGES.getMessage("unable.to.set.static.OFB.already.exists", getClassName(InitialContextFactoryBuilder.class)), e);
}

0 comments on commit 3ec4774

Please sign in to comment.