setTag, addTag追加

This commit is contained in:
ろむねこ 2024-06-06 18:23:01 +09:00
parent e717469441
commit e9d6c8001c
Signed by: Fujimatsu
GPG Key ID: FA1F39A1BA37D168
2 changed files with 15 additions and 0 deletions

View File

@ -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);

View File

@ -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));