Builds and runs.
This commit is contained in:
@@ -22,24 +22,19 @@ public class PluginSlf4jFactory implements ILoggerFactory {
|
||||
private String name;
|
||||
|
||||
private boolean isEnabled(Level level) {
|
||||
if (SshdPlugin.instance != null) {
|
||||
return SshdPlugin.instance.getLogger().isLoggable(level);
|
||||
}
|
||||
return false;
|
||||
return SshdPlugin.instance != null && SshdPlugin.instance.getLogger().isLoggable(level);
|
||||
}
|
||||
|
||||
private void log(Level level, String s, Object[] objects) {
|
||||
if (SshdPlugin.instance != null && isEnabled(level)) {
|
||||
FormattingTuple ft = MessageFormatter.arrayFormat(s, objects);
|
||||
SshdPlugin.instance.getLogger().log(level, ft.getMessage(), ft.getThrowable());
|
||||
SshdPlugin.instance.getLogger().log(level, s, Thread.currentThread().getStackTrace());
|
||||
}
|
||||
}
|
||||
|
||||
private void log(Level level, String s, Throwable throwable) {
|
||||
if (SshdPlugin.instance != null && isEnabled(level)) {
|
||||
SshdPlugin.instance.getLogger().log(level, s, throwable);
|
||||
SshdPlugin.instance.getLogger().log(level, s, Thread.currentThread().getStackTrace());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user