|
@ -3,6 +3,7 @@ package com.yihu.ehr.thread;
|
|
|
import com.yihu.ehr.config.ThreadConfig;
|
|
|
import com.yihu.ehr.dbhelper.jdbc.DBHelper;
|
|
|
import com.yihu.ehr.util.HttpsClientUtil;
|
|
|
import com.yihu.ehr.util.ZipUtil;
|
|
|
import com.yihu.ehr.util.log.LogUtil;
|
|
|
import org.apache.http.NameValuePair;
|
|
|
import org.apache.http.message.BasicNameValuePair;
|
|
@ -22,7 +23,7 @@ public class LogThread implements Runnable {
|
|
|
private String systemCode = "";
|
|
|
private int sleepTime = 60 * 1000;
|
|
|
private DBHelper db = new DBHelper();
|
|
|
private String logFileName = "esb_mini.log";
|
|
|
private String logFileName = "esb_mini.zip";
|
|
|
private String token;
|
|
|
|
|
|
@Override
|
|
@ -116,7 +117,9 @@ public class LogThread implements Runnable {
|
|
|
public String getLogFile() {
|
|
|
|
|
|
String home = System.getProperty("catalina.home").replace('\\', '/');
|
|
|
String filePath = home.substring(0, home.lastIndexOf('/') + 1) + "log/" + logFileName;
|
|
|
String srcPath = home.substring(0, home.lastIndexOf('/') + 1) + "log";
|
|
|
String filePath=srcPath+File.separator+logFileName;
|
|
|
ZipUtil.zip(srcPath,filePath);
|
|
|
LogUtil.info("日志文件路径:" + filePath);
|
|
|
File file = new File(filePath);
|
|
|
if (file.exists()) {
|