提交 c20e1790 authored 作者: Thomas Mueller's avatar Thomas Mueller

Timestamps in the trace log follow the format (yyyy-MM-dd HH:mm:ss)

上级 a5988159
......@@ -21,7 +21,7 @@ Change Log
<h2>Next Version (unreleased)</h2>
<ul>
<li>Timestamps in the trace log follow the format (MM-dd-yyyy HH:mm:ss) instead
<li>Timestamps in the trace log follow the format (yyyy-MM-dd HH:mm:ss) instead
of the old format (MM-dd HH:mm:ss). Patch by Richard Bull.
</li>
<li>Pull request #125: Improved Oracle compatibility with "truncate" with timestamps and dates.
......
......@@ -199,11 +199,11 @@ public class Engine implements SessionFactory {
Integer.MAX_VALUE);
command.executeUpdate();
} catch (DbException e) {
if (e.getErrorCode() == ErrorCode.ADMIN_RIGHTS_REQUIRED){
session.getTrace().error(e, "admin rights required; user: \"" +
if (e.getErrorCode() == ErrorCode.ADMIN_RIGHTS_REQUIRED) {
session.getTrace().error(e, "admin rights required; user: \"" +
ci.getUserName() + "\"");
} else {
session.getTrace().error(e, "");
session.getTrace().error(e, "");
}
if (!ignoreUnknownSetting) {
session.close();
......
......@@ -214,7 +214,7 @@ public class TraceSystem implements TraceWriter {
private synchronized String format(String module, String s) {
if (dateFormat == null) {
dateFormat = new SimpleDateFormat("MM-dd-yyyy HH:mm:ss ");
dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ");
}
return dateFormat.format(System.currentTimeMillis()) + module + ": " + s;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论