fix Mixin using Level.FATAL
All checks were successful
Publish to snapshot maven / build (push) Successful in 17s
All checks were successful
Publish to snapshot maven / build (push) Successful in 17s
slf4j does not have this log level
This commit is contained in:
parent
5a65161113
commit
eec8aaba57
|
@ -30,17 +30,17 @@ public class FrogMixinLogger extends LoggerAdapterAbstract {
|
|||
|
||||
@Override
|
||||
public void catching(Level level, Throwable t) {
|
||||
log.atLevel(org.slf4j.event.Level.valueOf(level.name())).setCause(t).log();
|
||||
log.atLevel(getLevel(level)).setCause(t).log();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void log(Level level, String message, Object... params) {
|
||||
log.atLevel(org.slf4j.event.Level.valueOf(level.name())).log(message, params);
|
||||
log.atLevel(getLevel(level)).log(message, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void log(Level level, String message, Throwable t) {
|
||||
log.atLevel(org.slf4j.event.Level.valueOf(level.name())).setCause(t).log(message);
|
||||
log.atLevel(getLevel(level)).setCause(t).log(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,4 +48,8 @@ public class FrogMixinLogger extends LoggerAdapterAbstract {
|
|||
log.atLevel(org.slf4j.event.Level.WARN).setCause(t).log();
|
||||
return t;
|
||||
}
|
||||
|
||||
private org.slf4j.event.Level getLevel(Level level) {
|
||||
return org.slf4j.event.Level.valueOf(level == Level.FATAL ? "ERROR" : level.toString());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue