01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19:
20: package org.apache.geronimo.kernel.config;
21:
22: import org.apache.geronimo.kernel.repository.Artifact;
23: import org.apache.commons.logging.Log;
24:
25: /**
26: * @version $Rev: 607674 $ $Date: 2007-12-30 21:16:26 -0800 (Sun, 30 Dec 2007) $
27: */
28: public class DebugLoggingLifecycleMonitor implements LifecycleMonitor {
29: private final Log log;
30:
31: public DebugLoggingLifecycleMonitor(Log log) {
32: this .log = log;
33: }
34:
35: public void addConfiguration(Artifact configurationId) {
36: log.debug("added module: " + configurationId);
37: }
38:
39: public void resolving(Artifact configurationId) {
40: log.debug("resolving dependencies for module: "
41: + configurationId);
42: }
43:
44: public void reading(Artifact configurationId) {
45: log.debug("reading module: " + configurationId);
46: }
47:
48: public void loading(Artifact configurationId) {
49: log.debug("loading module: " + configurationId);
50: }
51:
52: public void starting(Artifact configurationId) {
53: log.debug("starting module: " + configurationId);
54: }
55:
56: public void stopping(Artifact configurationId) {
57: log.debug("stopping module: " + configurationId);
58: }
59:
60: public void unloading(Artifact configurationId) {
61: log.debug("unloading module: " + configurationId);
62: }
63:
64: public void succeeded(Artifact configurationId) {
65: log.debug("succeeded module: " + configurationId);
66: }
67:
68: public void failed(Artifact configurationId, Throwable cause) {
69: log.debug("failed module: " + configurationId);
70: }
71:
72: public void finished() {
73: log.debug("Lifecycle finished");
74: }
75: }
|