提交 5331af05 authored 作者: noelgrandin's avatar noelgrandin

don't open a temporary file if the trace level is set to zero

上级 2da24671
......@@ -340,9 +340,11 @@ public class SessionRemote extends SessionWithState implements DataHandler {
int level = Integer.parseInt(traceLevelFile);
String prefix = getFilePrefix(SysProperties.CLIENT_TRACE_DIRECTORY);
try {
String file = FileUtils.createTempFile(prefix, Constants.SUFFIX_TRACE_FILE, false, false);
traceSystem.setFileName(file);
traceSystem.setLevelFile(level);
if (level > 0) {
String file = FileUtils.createTempFile(prefix, Constants.SUFFIX_TRACE_FILE, false, false);
traceSystem.setFileName(file);
}
} catch (IOException e) {
throw DbException.convertIOException(e, prefix);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论