KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > logging > log4j > LoggingManagerImpl


1 /*
2  * Copyright 2004 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
18 package org.apache.avalon.logging.log4j;
19
20 import org.apache.avalon.framework.logger.Logger;
21 import org.apache.avalon.logging.data.CategoriesDirective;
22
23 import org.apache.avalon.logging.provider.LoggingManager;
24
25 /**
26  * A <code>LoggerManager</code> that supports the management of a logging hierarchy.
27  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
28  */

29 public class LoggingManagerImpl
30     implements LoggingManager
31 {
32     
33     LoggingManagerImpl()
34     {
35     }
36     
37     /**
38      * Add a set of category entries using the supplied categories descriptor.
39      * @param descriptor a set of category descriptors to be added under the path
40      */

41     public void addCategories( CategoriesDirective descriptor )
42     {
43     }
44
45     /**
46      * Add a set of category entries relative to the supplied base category
47      * path, using the supplied descriptor as the definition of subcategories.
48      * @param path the category base path
49      * @param descriptor a set of category descriptors to be added under
50      * the base path
51      */

52     public void addCategories( String JavaDoc path, CategoriesDirective descriptor )
53     {
54     }
55
56     /**
57      * Return the Logger for the specified category.
58      * @param category the category path
59      * @return the logging channel
60      */

61     public Logger getLoggerForCategory( final String JavaDoc category )
62     {
63         org.apache.log4j.Logger log4j =
64             org.apache.log4j.Logger.getLogger( category );
65         return new Log4JLogger( log4j );
66     }
67 }
68  
69
Popular Tags