KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > logging > provider > LoggingCriteria


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.provider;
19
20 import java.io.File JavaDoc;
21 import java.net.URL JavaDoc;
22 import java.util.Map JavaDoc;
23
24 import org.apache.avalon.framework.logger.Logger;
25
26 /**
27  * LoggingCriteria is convinience interface that extends Map with
28  * a set of operations that enable easy manipulation of the logging
29  * system parameters.
30  *
31  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
32  * @version $Revision: 1.3 $
33  */

34 public interface LoggingCriteria extends Map JavaDoc
35 {
36     //--------------------------------------------------------------
37
// criteria keys
38
//--------------------------------------------------------------
39

40    /**
41     * The logging configuration key.
42     */

43     String JavaDoc LOGGING_CONFIGURATION_KEY =
44       "avalon.logging.configuration";
45
46    /**
47     * The logging system bootstrap logger key.
48     */

49     String JavaDoc LOGGING_BOOTSTRAP_KEY =
50       "avalon.logging.bootstrap";
51
52    /**
53     * The key of a the criteria argument that declares the base
54     * directory to be used for persistent content. For example,
55     * logging file should be created in the directory
56     * assigned to this key.
57     */

58     String JavaDoc LOGGING_BASEDIR_KEY =
59       "avalon.logging.basedir";
60
61    /**
62     * Update Interval.
63     * Logging subsystems that supports changes on-the-fly, will
64     * be passed this argument.
65     */

66     String JavaDoc LOGGING_INTERVAL_KEY =
67       "avalon.logging.update";
68
69    /**
70     * Debug mode.
71     */

72     String JavaDoc LOGGING_DEBUG_KEY =
73       "avalon.logging.debug";
74
75    /**
76     * Set the debug enabled policy
77     * @param mode TRUE to enabled debug mode else FALSE
78     */

79     void setDebugEnabled( boolean mode );
80
81    /**
82     * Set the bootstrap logging channel
83     * @param logger the boootstrap logging channel
84     */

85     void setBootstrapLogger( Logger logger );
86
87    /**
88     * Set the base directory.
89     * @param dir the base directory
90     */

91     void setBaseDirectory( File JavaDoc dir );
92
93    /**
94     * Set the configuration URL.
95     * @param url the configuration URL
96     */

97     void setLoggingConfiguration( URL JavaDoc url );
98
99    /**
100     * Get the bootstrap logging channel
101     * @return the boootstrap logging channel
102     */

103     Logger getBootstrapLogger();
104
105    /**
106     * Returns the base directory for logging resources.
107     * @return the base directory
108     */

109     File JavaDoc getBaseDirectory();
110
111    /**
112     * Returns debug policy. If TRUE all logging channels will be
113     * set to debug level.
114     *
115     * @return the debug policy
116     */

117     boolean isDebugEnabled();
118
119    /**
120     * Returns an external logging system configuration file
121     * @return the configuration file (possibly null)
122     */

123     URL JavaDoc getLoggingConfiguration();
124
125    /**
126     * Returns the logging configuration update interval.
127     */

128     long getUpdateInterval();
129     
130 }
131
Popular Tags