X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fgeneral%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fcontainer%2FContainer.java;h=2baaa2021ab18be7c979ff5fbeee64c2c52577bc;hb=49ce7cb8387601982d5e6ef186ce206d38f6e3d7;hp=dc0995a42216d261a47ee9f22287f01dedf0f08b;hpb=17775e14ecfb286e59f67117e5cee7e21e95ab1f;p=utils diff --git a/system/general/src/main/java/org/wamblee/system/container/Container.java b/system/general/src/main/java/org/wamblee/system/container/Container.java index dc0995a4..2baaa202 100644 --- a/system/general/src/main/java/org/wamblee/system/container/Container.java +++ b/system/general/src/main/java/org/wamblee/system/container/Container.java @@ -12,14 +12,16 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ package org.wamblee.system.container; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; import org.wamblee.general.Pair; - import org.wamblee.system.core.AbstractComponent; import org.wamblee.system.core.Component; import org.wamblee.system.core.DefaultScope; @@ -34,17 +36,14 @@ import org.wamblee.system.graph.component.ConnectExternalProvidedProvidedFilter; import org.wamblee.system.graph.component.ConnectRequiredExternallyRequiredEdgeFilter; import org.wamblee.system.graph.component.ConnectRequiredProvidedEdgeFilter; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - /** * Container consisting of multiple components. * * @author Erik Brakkee */ public class Container extends AbstractComponent { - private static final Log LOG = LogFactory.getLog(Container.class); + private static final Logger LOG = Logger.getLogger(Container.class + .getName()); private List components; @@ -369,8 +368,9 @@ public class Container extends AbstractComponent { } catch (SystemAssemblyException e) { throw e; } catch (RuntimeException e) { - LOG.error(getQualifiedName() + ": could not start '" + - component.getQualifiedName() + "'", e); + LOG.log(Level.WARNING, getQualifiedName() + + ": could not start '" + component.getQualifiedName() + "'", + e); stopAlreadyStartedComponents(started, aScope); throw e; } @@ -408,8 +408,10 @@ public class Container extends AbstractComponent { Component component = aStarted.get(i); aStarted.get(i).stop(aScope.getRuntime(component)); } catch (Throwable t) { - LOG.error(getQualifiedName() + ": error stopping " + - aStarted.get(i).getQualifiedName()); + LOG + .log(Level.WARNING, getQualifiedName() + + ": error stopping " + + aStarted.get(i).getQualifiedName(), t); } } }