setTag, addTag追加
This commit is contained in:
parent
e717469441
commit
e9d6c8001c
|
@ -3,6 +3,8 @@ package one.nem.kidshift.utils;
|
|||
public interface KSLogger {
|
||||
KSLogger getChildLogger(String tag);
|
||||
KSLogger get(String tag);
|
||||
KSLogger setTag(String tag);
|
||||
KSLogger addTag(String tag);
|
||||
void info(String message);
|
||||
void warn(String message);
|
||||
void error(String message);
|
||||
|
|
|
@ -38,6 +38,19 @@ public class KSLoggerImpl implements KSLogger {
|
|||
return new KSLoggerImpl(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KSLogger setTag(String tag) {
|
||||
tags.clear();
|
||||
tags.add(tag);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KSLogger addTag(String tag) {
|
||||
tags.add(tag);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(String message) {
|
||||
log(new LogModel(LogLevelEnum.INFO, new String[]{}, message));
|
||||
|
|
Loading…
Reference in New Issue
Block a user