Commit 648d574e by WeiCong

交易结束前清空MDC里面的日志记录

parent 2030969e
......@@ -20,6 +20,7 @@ import com.brilliance.eibs.factory.parser.ParserFactory;
import com.brilliance.eibs.util.*;
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.MDC;
import java.io.File;
import java.io.FileOutputStream;
......@@ -335,11 +336,13 @@ public class Client {
} catch (Exception e) {
logger.error("Close connection error", e);
} finally {
if (fos != null)
if (fos != null){
IOUtils.closeQuietly(fos);
}
}
MDC.remove(LogUtil.LOG_FILE_NAME_SYMBOL);
logger.debug("transaction finally done.");
}
return msg;
}
......@@ -562,9 +565,11 @@ public class Client {
} catch (Exception e) {
logger.error("Close connection error", e);
} finally {
if (fos != null)
if (fos != null) {
IOUtils.closeQuietly(fos);
}
}
MDC.remove(LogUtil.LOG_FILE_NAME_SYMBOL);
logger.debug("transaction finally done.");
}
return msg;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment