summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2014-11-08 12:41:09 +0000
committerKeith Wall <kwall@apache.org>2014-11-08 12:41:09 +0000
commit64ff5cf351b48ab4c050c0b32cee47b83dbbdb60 (patch)
treedbe82e5f869bf24f459b5bce61da2e67a794a422 /qpid/java
parent3a8431a106b88149e545c426bc104548ec28a2ed (diff)
downloadqpid-python-64ff5cf351b48ab4c050c0b32cee47b83dbbdb60.tar.gz
QPID-6219: [Java Broker] Configure logging before using QpidService to avoid log4j warning on startup
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1637549 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/Broker.java13
-rw-r--r--qpid/java/broker/etc/log4j.xml4
2 files changed, 9 insertions, 8 deletions
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/Broker.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/Broker.java
index 7780f060bb..44ed6d4d4c 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/Broker.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/Broker.java
@@ -143,6 +143,13 @@ public class Broker implements BrokerShutdownProvider
private void startupImpl(final BrokerOptions options) throws Exception
{
+ //Allow skipping the logging configuration for people who are
+ //embedding the broker and want to configure it themselves.
+ if(!options.isSkipLoggingConfiguration())
+ {
+ configureLogging(new File(options.getLogConfigFileLocation()), options.getLogWatchFrequency());
+ }
+
String storeLocation = options.getConfigurationStoreLocation();
String storeType = options.getConfigurationStoreType();
@@ -156,12 +163,6 @@ public class Broker implements BrokerShutdownProvider
_eventLogger.message(BrokerMessages.CONFIG(storeLocation));
- //Allow skipping the logging configuration for people who are
- //embedding the broker and want to configure it themselves.
- if(!options.isSkipLoggingConfiguration())
- {
- configureLogging(new File(options.getLogConfigFileLocation()), options.getLogWatchFrequency());
- }
LogRecorder logRecorder = new LogRecorder();
diff --git a/qpid/java/broker/etc/log4j.xml b/qpid/java/broker/etc/log4j.xml
index 71a13875a1..7229707074 100644
--- a/qpid/java/broker/etc/log4j.xml
+++ b/qpid/java/broker/etc/log4j.xml
@@ -87,12 +87,12 @@
</layout>
</appender>
- <!-- Provide warnings to standard output -->
+ <!-- General logging hierarchy -->
<logger additivity="true" name="org.apache.qpid">
<level value="warn"/>
</logger>
- <!-- Enable info messages for the status-logging hierarchy -->
+ <!-- Operational logging hierarchy -->
<logger additivity="true" name="qpid.message">
<level value="info"/>
</logger>