From 9a960d4c27f82b6ff390dcbdb674c777c29fc576 Mon Sep 17 00:00:00 2001 From: antelder Date: Tue, 8 Feb 2011 11:34:37 +0000 Subject: More quiet logging updates git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1068340 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java | 5 ++++- .../src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'sca-java-2.x/trunk/modules') diff --git a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java index 4b8c071855..3f66f85283 100644 --- a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java +++ b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java @@ -100,6 +100,8 @@ public class NodeFactoryImpl extends NodeFactory { */ protected boolean autoDestroy = true; + protected boolean quietLogging; + @Override public Node createNode(NodeConfiguration configuration) { if (configuration.getURI() == null) { @@ -243,6 +245,7 @@ public class NodeFactoryImpl extends NodeFactory { monitorFactory = utilities.getUtility(MonitorFactory.class); utilities.getUtility(RuntimeProperties.class).setProperties(properties); + quietLogging = Boolean.parseBoolean(properties.getProperty(RuntimeProperties.QUIET_LOGGING)); // Use the runtime-enabled assembly factory FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); @@ -339,7 +342,7 @@ public class NodeFactoryImpl extends NodeFactory { URL contributionURL = uri.toURL(); // Load the contribution - logger.log(Level.INFO, "Loading contribution: " + contributionURL); + logger.log(quietLogging? Level.FINE : Level.INFO, "Loading contribution: " + contributionURL); Contribution contribution = deployer.loadContribution(contributionURI, contributionURL, context.getMonitor()); contributions.add(contribution); diff --git a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java index 3abecec043..8197c1b9b4 100644 --- a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java +++ b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java @@ -98,7 +98,7 @@ public class NodeImpl implements Node { } public Node start() { - logger.log(Level.INFO, "Starting node: " + configuration.getURI() + " domain: " + configuration.getDomainURI()); + logger.log(nodeFactory.quietLogging? Level.FINE : Level.INFO, "Starting node: " + configuration.getURI() + " domain: " + configuration.getDomainURI()); nodeFactory.init(); nodeFactory.addNode(configuration, this); @@ -172,7 +172,7 @@ public class NodeImpl implements Node { } public void stop() { - logger.log(Level.INFO, "Stopping node: " + configuration.getURI()); + logger.log(nodeFactory.quietLogging? Level.FINE : Level.INFO, "Stopping node: " + configuration.getURI()); try { if (compositeActivator == null) { -- cgit v1.2.3