邮箱自动处理日志信息存储修改
This commit is contained in:
parent
25459ab06e
commit
c697b8da71
|
@ -1,5 +1,6 @@
|
|||
package org.jeecg.modules.spectrum;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.common.constant.StringConstant;
|
||||
|
@ -7,6 +8,7 @@ import org.jeecg.common.email.EmailServiceManager;
|
|||
import org.jeecg.common.properties.SpectrumPathProperties;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.modules.email.EmailProperties;
|
||||
import org.jeecg.modules.exception.StationNotFoundException;
|
||||
|
||||
import javax.mail.Message;
|
||||
import javax.mail.MessagingException;
|
||||
|
@ -105,6 +107,14 @@ public class SpectrumParsingActuator implements Runnable{
|
|||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
//生成日志
|
||||
String warning = "";
|
||||
if (e.getClass().equals(StationNotFoundException.class)) {
|
||||
warning = e.getMessage()+ StringPool.SPACE+"timeout:0,waittime:"+spectrumServiceQuotes.getTaskProperties().getUndealFileTimeOut();
|
||||
} else {
|
||||
warning = e.getMessage();
|
||||
}
|
||||
spectrumServiceQuotes.getLogFileUtil().errorLog(finalFileName.toString(), warning, e);
|
||||
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