KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > util > monolog > provider > api > LoggerProvider


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2003 USTL - LIFL - GOAL
5 Contact: openccm-team@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Jerome Offroy.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.util.monolog.provider.api;
28
29 import java.util.Properties JavaDoc;
30
31 import org.objectweb.util.monolog.api.LevelFactory;
32 import org.objectweb.util.monolog.api.Logger;
33 import org.objectweb.util.monolog.api.LoggerFactory;
34
35 /**
36  * @author Jerome Offroy
37  *
38  */

39 public interface LoggerProvider { //TODO split into multiple interfaces
40

41     /***********************************************************************
42      * Factories interface
43      **********************************************************************/

44     /**
45      * Shortcut that returns the LevelFactory
46      */

47     public LevelFactory getLevelFactory();
48     
49     /**
50      * Configure Logger for OpenCCM modules
51      */

52     public void configure(String JavaDoc file, boolean useclasspath);
53
54     /**
55      * returns list of properties for logging system
56      */

57     public Properties JavaDoc getProperties();
58
59     /**
60     * returns the unique LoggerFactory used in OpenCCM.
61     * initialize it if not already done.
62     */

63     public LoggerFactory getLoggerFactory();
64
65     /***********************************************************************
66      * Logger interface
67      **********************************************************************/

68     /**
69     * Shortcut to get the Logger by its topic name.
70     * @param topic is the topic of the returned logger
71     * @return always a logger instance (never null value).
72     */

73     public Logger getLogger(String JavaDoc topic);
74
75     /**
76      * Shortcut to get the Logger by its topic name and by class .
77      * @param topic is the topic of the returned logger
78      * @param caller class reference
79      * @return Logger
80      */

81     public Logger getLogger(String JavaDoc topic, Class JavaDoc caller);
82
83     /**
84      * Method createLogger return a new Logger with specified topic.
85      * @param topic
86      * @param caller
87      * @param description
88      * @return Logger
89      */

90     public Logger createLogger(String JavaDoc topic, Class JavaDoc caller, String JavaDoc[] description);
91
92     /***********************************************************************
93      * Topics interface
94      **********************************************************************/

95     /**
96      * get Topic Level for a specified Topic
97      */

98     public String JavaDoc getTopicLevel(String JavaDoc topic);
99
100     /**
101      * get all Topics from Logger Factory(Monolog).
102      * Assumes that all Loggers are TopicalLoggers.
103      */

104     public String JavaDoc[] getTopics();
105
106     /**
107      * set Topic Level for a specified Topic
108      */

109     public void setTopicLevel(String JavaDoc topic, String JavaDoc l);
110
111 }
Popular Tags