/
Log.java
46 lines (37 loc) · 1.22 KB
/
Log.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package org.jgroups.logging;
/**
* Simple logging wrapper for log4j or JDK logging. Code originally copied from Infinispan
*
* @author Manik Surtani
* @author Bela Ban
* @since 2.8
*/
public interface Log {
boolean isFatalEnabled();
boolean isErrorEnabled();
boolean isWarnEnabled();
boolean isInfoEnabled();
boolean isDebugEnabled();
boolean isTraceEnabled();
void fatal(String msg);
void fatal(String msg, Throwable throwable);
void error(String msg);
void error(String msg, Throwable throwable);
void warn(String msg);
void warn(String msg, Throwable throwable);
void info(String msg);
void debug(String msg);
void debug(String msg, Throwable throwable);
void trace(Object msg);
void trace(String msg);
void trace(String msg, Throwable throwable);
// Advanced methods
/**
* Sets the level of a logger. This method is used to dynamically change the logging level of a running system,
* e.g. via JMX. The appender of a level needs to exist.
* @param level The new level. Valid values are "fatal", "error", "warn", "info", "debug", "trace"
* (capitalization not relevant)
*/
void setLevel(String level);
String getLevel();
}