From 64ff5cf351b48ab4c050c0b32cee47b83dbbdb60 Mon Sep 17 00:00:00 2001 From: Keith Wall Date: Sat, 8 Nov 2014 12:41:09 +0000 Subject: 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 --- .../src/main/java/org/apache/qpid/server/Broker.java | 13 +++++++------ qpid/java/broker/etc/log4j.xml | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'qpid/java') 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 @@ - + - + -- cgit v1.2.1