1 package org.codehaus.plexus.logging;
2
3 /*
4 * Copyright 2001-2006 Codehaus Foundation.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19 /**
20 * @author Jason van Zyl
21 * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
22 */
23 public interface Logger {
24 /** Typecode for debugging messages. */
25 int LEVEL_DEBUG = 0;
26
27 /** Typecode for informational messages. */
28 int LEVEL_INFO = 1;
29
30 /** Typecode for warning messages. */
31 int LEVEL_WARN = 2;
32
33 /** Typecode for error messages. */
34 int LEVEL_ERROR = 3;
35
36 /** Typecode for fatal error messages. */
37 int LEVEL_FATAL = 4;
38
39 /** Typecode for disabled log levels. */
40 int LEVEL_DISABLED = 5;
41
42 void debug(String message);
43
44 void debug(String message, Throwable throwable);
45
46 boolean isDebugEnabled();
47
48 void info(String message);
49
50 void info(String message, Throwable throwable);
51
52 boolean isInfoEnabled();
53
54 void warn(String message);
55
56 void warn(String message, Throwable throwable);
57
58 boolean isWarnEnabled();
59
60 void error(String message);
61
62 void error(String message, Throwable throwable);
63
64 boolean isErrorEnabled();
65
66 void fatalError(String message);
67
68 void fatalError(String message, Throwable throwable);
69
70 boolean isFatalErrorEnabled();
71
72 Logger getChildLogger(String name);
73
74 int getThreshold();
75
76 void setThreshold(int threshold);
77
78 String getName();
79 }