Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHristo Iliev2011-10-13 11:04:49 -0400
committerHristo Iliev2011-10-13 11:04:49 -0400
commitd7945dc186bbf7b010f1c3865d59f7b7574297f5 (patch)
tree1db9fca0abb0d0d6581d7e7d9bc19734f4006e88
parent5090b48a3a6de4c2edee220677871a41d495b3c8 (diff)
downloadorg.eclipse.virgo.medic-d7945dc186bbf7b010f1c3865d59f7b7574297f5.tar.gz
org.eclipse.virgo.medic-d7945dc186bbf7b010f1c3865d59f7b7574297f5.tar.xz
org.eclipse.virgo.medic-d7945dc186bbf7b010f1c3865d59f7b7574297f5.zip
Bug 358129: Merged duplicated code
-rwxr-xr-xorg.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/impl/LogController.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/impl/LogController.java b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/impl/LogController.java
index b7db7a2..afc5666 100755
--- a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/impl/LogController.java
+++ b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/impl/LogController.java
@@ -144,12 +144,9 @@ public class LogController implements ConfigurationChangeListener {
public void logStart() throws ConfigurationPublicationFailedException {
Dictionary<String, String> configuration = configurationProvider.getConfiguration();
- updateLogConfiguration(configuration);
-
SLF4JBridgeHandler.install();
- if (!Boolean.valueOf(configuration.get(ConfigurationProvider.KEY_ENABLE_JUL_CONSOLE_HANDLER))) {
- disableJulConsoleHandler();
- }
+
+ updateLogConfiguration(configuration);
}
public void logStop() {
@@ -275,14 +272,7 @@ public class LogController implements ConfigurationChangeListener {
@Override
public void configurationChanged(ConfigurationProvider provider) {
Dictionary<String, String> configuration = configurationProvider.getConfiguration();
-
updateLogConfiguration(configuration);
-
- if (Boolean.valueOf(configuration.get(ConfigurationProvider.KEY_ENABLE_JUL_CONSOLE_HANDLER))) {
- enableJulConsoleLogger();
- } else {
- disableJulConsoleHandler();
- }
}
private synchronized void updateLogConfiguration(Dictionary<String, String> configuration) {
@@ -319,5 +309,11 @@ public class LogController implements ConfigurationChangeListener {
}
System.setErr(delegatingSysErr);
}
+
+ if (Boolean.valueOf(configuration.get(ConfigurationProvider.KEY_ENABLE_JUL_CONSOLE_HANDLER))) {
+ enableJulConsoleLogger();
+ } else {
+ disableJulConsoleHandler();
+ }
}
}

Back to the top