修改日志
This commit is contained in:
parent
36b48af67d
commit
048ecdeb3b
@ -5,17 +5,32 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
public class SydLogger {
|
||||
|
||||
private ConcurrentLinkedQueue<LogInfo> queue;
|
||||
|
||||
SydLogger(ConcurrentLinkedQueue<LogInfo> queue) {
|
||||
this.queue = queue;
|
||||
}
|
||||
|
||||
public void debug(String msg, Object... params) {
|
||||
if (SydLogFactory.iLogLevel == 3) {
|
||||
this.queue.add(new LogInfo(3, msg, params));
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public void info(String msg, Object... params) {
|
||||
if (SydLogFactory.iLogLevel >= 2) {
|
||||
this.queue.add(new LogInfo(2, msg, params));
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public void error(String msg, Object... params) {
|
||||
if (SydLogFactory.iLogLevel >= 1) {
|
||||
this.queue.add(new LogInfo(1, msg, params));
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user