Title: [677] trunk/core/src/main/java/org/servicemix/jbi/container/JBIContainer.java: Improve logging when an erro occurs creating the NamingContext
- Revision
- 677
- Author
- gnt
- Date
- 2005-10-26 09:08:55 -0400 (Wed, 26 Oct 2005)
Log Message
Improve logging when an erro occurs creating the NamingContext
Modified Paths
Diff
Modified: trunk/core/src/main/java/org/servicemix/jbi/container/JBIContainer.java (676 => 677)
--- trunk/core/src/main/java/org/servicemix/jbi/container/JBIContainer.java 2005-10-26 10:40:09 UTC (rev 676)
+++ trunk/core/src/main/java/org/servicemix/jbi/container/JBIContainer.java 2005-10-26 13:08:55 UTC (rev 677)
@@ -384,7 +384,12 @@
this.namingContext = new InitialContext();
}
catch (NamingException e) {
- log.warn("Failed to set InitialContext");
+ // Log a warning, with exception only in debug
+ if (log.isDebugEnabled()) {
+ log.warn("Failed to set InitialContext", e);
+ } else {
+ log.warn("Failed to set InitialContext");
+ }
}
}
this.managementContext.init(this, getMBeanServer());