KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > excalibur > component > servlet > LoggerManagerReferenceProxy


1 /*
2  * Copyright 2002-2004 The Apache Software Foundation
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12  * implied.
13  *
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.avalon.excalibur.component.servlet;
18
19 import org.apache.avalon.excalibur.logger.LoggerManager;
20 import org.apache.avalon.framework.logger.Logger;
21
22 /**
23  * Reference Proxy to a LoggerManager
24  *
25  * @deprecated ECM is no longer supported
26  *
27  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
28  * @version CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:16 $
29  * @since 4.2
30  */

31 final class LoggerManagerReferenceProxy
32     extends AbstractReferenceProxy
33     implements LoggerManager
34 {
35     private LoggerManager m_loggerManager;
36
37     /*---------------------------------------------------------------
38      * Constructors
39      *-------------------------------------------------------------*/

40     /**
41      * Create a new proxy.
42      *
43      * @param componentManager LoggerManager being proxied.
44      * @param latch Latch wich will be notified when this proxy is finalized.
45      * @param name Name of the proxy.
46      */

47     LoggerManagerReferenceProxy( LoggerManager loggerManager,
48                                  AbstractReferenceProxyLatch latch,
49                                  String JavaDoc name )
50     {
51         super( latch, name );
52         m_loggerManager = loggerManager;
53     }
54
55     /*---------------------------------------------------------------
56      * LoggerManager Methods
57      *-------------------------------------------------------------*/

58     /**
59      * Return the Logger for the specified category.
60      */

61     public Logger getLoggerForCategory( String JavaDoc categoryName )
62     {
63         return m_loggerManager.getLoggerForCategory( categoryName );
64     }
65
66     /**
67      * Return the default Logger. This is basically the same
68      * as getting the Logger for the "" category.
69      */

70     public Logger getDefaultLogger()
71     {
72         return m_loggerManager.getDefaultLogger();
73     }
74 }
75
Popular Tags