if (logDest.getValidLevels() != null && Arrays.asList(logDest.getValidLevels()).contains(level)) {
if (logDest instanceof Log4JAppenderAccessor) {
Log4JAppenderAccessor accessor = (Log4JAppenderAccessor) logDest;
accessor.getLoggerAccessor().setLevel(level);
} else if (logDest instanceof Jdk14HandlerAccessor) {
Jdk14HandlerAccessor accessor = (Jdk14HandlerAccessor) logDest;
accessor.getLoggerAccessor().setLevel(level);
} else if (logDest instanceof LogbackAppenderAccessor) {
LogbackAppenderAccessor accessor = (LogbackAppenderAccessor) logDest;
accessor.getLoggerAccessor().setLevel(level);
}
}
return null;
}