if (!(handler instanceof HandlerMethod)) {
return ;
}
final HandlerMethod handlerMethod = (HandlerMethod)handler;
Method method = handlerMethod.getMethod();
final Log log = method.getAnnotation(Log.class);
if (log != null) {
// 得到LogMessageObject
final LogMessageObject logMessageObject = LogUitls.getArgs();
// 另起线程异步操作
new Thread(new Runnable() {
@Override
public void run() {
try {
LogLevel lastLogLevel = logAPI.getRootLogLevel();
// 先对自定义包等级做判断
Map<String, LogLevel> customLogLevel = logAPI.getCustomLogLevel();
if (!customLogLevel.isEmpty()) {
Class<?> clazz = handlerMethod.getBean().getClass();
String packageName = clazz.getPackage().getName();
Set<String> keys = customLogLevel.keySet();
for (String key : keys) {
if (packageName.startsWith(key)) {