fix:1.修改报错状态写入日志
This commit is contained in:
parent
15218c505b
commit
f486d4e994
|
@ -137,7 +137,7 @@ public class FileSourceHandleManager{
|
|||
spectrumHandler.handler();
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error("Parsing the {} file of the filesource directory failed",spectrumFile.getName());
|
||||
log.error("Parsing the {} file of the filesource directory failed.The reason is {}",spectrumFile.getName(),e.getMessage());
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
taskLatch.countDown();
|
||||
|
|
|
@ -134,7 +134,7 @@ public class UndealHandleManager{
|
|||
spectrumHandler.handler();
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error("The {} file of the undeal directory fails to be parsed again",spectrumFile.getName());
|
||||
log.error("The {} file of the undeal directory fails to be parsed again.The reason is {}",spectrumFile.getName(),e.getMessage());
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
this.taskLatch.countDown();
|
||||
|
|
|
@ -165,8 +165,7 @@ public class Sample_B_Analysis implements BlockConstant {
|
|||
pushToRedis();
|
||||
}catch (Exception e){
|
||||
analyseFail = true;
|
||||
e.printStackTrace();
|
||||
throw new BAnalyseException("Sample Analyse Error at "+DateUtils.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss"));
|
||||
throw new BAnalyseException(e.getMessage());
|
||||
}finally {
|
||||
this.endAnalysisTime = new Date();
|
||||
//如果分析成功并且analyses对象不为空
|
||||
|
|
|
@ -100,12 +100,12 @@ public class SpectrumParsingActuator implements Runnable{
|
|||
//开始解析
|
||||
spectrumHandler.handler();
|
||||
}else{
|
||||
log.warn("此邮件{}匹配失败,不在气象谱、警告谱、健康状态谱、样品谱、探测器本地谱、QC谱、气体谱之列",subject);
|
||||
log.warn("This email {} parsing failed and is not listed in the Met, Alert, SOH, Sample, Detbkphd, QC, Gasbkphd spectra.",subject);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// log.error(mailContent.toString());
|
||||
log.error("邮件解析失败,邮件主题为:{},发送时间为:{},接收时间为:{},失败原因为:{}",subject,sendTime,receiveTime,e.getMessage());
|
||||
log.error("This email failed to parse. The email subject is: {}, sent on: {}, received on: {}, and the reason for the failure is: {}",subject,sendTime,receiveTime,e.getMessage());
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
//删除邮箱中已处理过的邮件
|
||||
|
|
Loading…
Reference in New Issue
Block a user