更新
This commit is contained in:
@@ -31,9 +31,13 @@ public class DeviceExecuteLogServiceImpl implements DeviceExecuteLogService {
|
||||
@Override
|
||||
public void deviceExecuteLog(String device_code, String vehicle_code, String inst_code, String message) {
|
||||
try {
|
||||
MDC.put("device_code_log",device_code);
|
||||
log.info("{},{}",device_code,message);
|
||||
}finally {
|
||||
MDC.put("device_code_log", device_code);
|
||||
log.info("{},{}", device_code, message);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage());
|
||||
} finally {
|
||||
MDC.remove("device_code_log");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user