diff options
| author | Alex Rudyy <orudyy@apache.org> | 2013-02-19 09:35:28 +0000 |
|---|---|---|
| committer | Alex Rudyy <orudyy@apache.org> | 2013-02-19 09:35:28 +0000 |
| commit | a973713561140fe7395368ae53def8f7edfa18a3 (patch) | |
| tree | 7bda80afada592df681fb73908400e7a189f015f /qpid/java/broker/src/velocity | |
| parent | 1b0f1d06188e73e9440dc1789c28ee65e24d539d (diff) | |
| download | qpid-python-a973713561140fe7395368ae53def8f7edfa18a3.tar.gz | |
QPID-4390: Introduce a configuration store in java broker allowing runtime modifications and replace existing xml file configuration with json configuration store
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1447646 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker/src/velocity')
| -rw-r--r-- | qpid/java/broker/src/velocity/templates/org/apache/qpid/server/logging/messages/LogMessages.vm | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/qpid/java/broker/src/velocity/templates/org/apache/qpid/server/logging/messages/LogMessages.vm b/qpid/java/broker/src/velocity/templates/org/apache/qpid/server/logging/messages/LogMessages.vm index 02bf155c44..cddfcfb581 100644 --- a/qpid/java/broker/src/velocity/templates/org/apache/qpid/server/logging/messages/LogMessages.vm +++ b/qpid/java/broker/src/velocity/templates/org/apache/qpid/server/logging/messages/LogMessages.vm @@ -23,8 +23,8 @@ package ${package}; import static org.apache.qpid.server.logging.AbstractRootMessageLogger.DEFAULT_LOG_HIERARCHY_PREFIX; import org.apache.log4j.Logger; +import org.apache.qpid.server.configuration.BrokerProperties; import org.apache.qpid.server.logging.LogMessage; -import org.apache.qpid.server.registry.ApplicationRegistry; import java.text.MessageFormat; import java.util.Locale; @@ -44,7 +44,7 @@ import java.util.ResourceBundle; public class ${type.name}Messages { private static ResourceBundle _messages; - private static Locale _currentLocale; + private static Locale _currentLocale = BrokerProperties.getLocale(); public static final String ${type.name.toUpperCase()}_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "${type.name.toLowerCase()}"; #foreach( $message in ${type.list} ) @@ -58,24 +58,9 @@ public class ${type.name}Messages Logger.getLogger(${message.methodName.toUpperCase()}_LOG_HIERARCHY); #end - reload(); - } - - public static void reload() - { - if (ApplicationRegistry.isConfigured()) - { - _currentLocale = ApplicationRegistry.getInstance().getConfiguration().getLocale(); - } - else - { - _currentLocale = Locale.getDefault(); - } - _messages = ResourceBundle.getBundle("${resource}", _currentLocale); } - ## ## The list stored under key 'list' in the 'type' HashMap contains all the ## log messages that this class should contain. So for each entry in the list |
