[openrtm-commit:00304] r520 - in trunk: . jp.go.aist.rtm.RTC jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/log
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 8月 3日 (水) 17:03:58 JST
Author: fsi-katami
Date: 2011-08-03 17:03:58 +0900 (Wed, 03 Aug 2011)
New Revision: 520
Modified:
trunk/
trunk/jp.go.aist.rtm.RTC/
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/DefaultConfiguration.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/log/Logbuf.java
Log:
Changed the format of the log. Added the millisecond.
refs #1977
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/RELENG_1_0_0:60-401
/branches/work/ForSDOServiceAdminClass:505-507
/branches/work/ToIFR_ID:509-514
+ /branches/RELENG_1_0_0:60-401
/branches/work/ForLogFormat:518-519
/branches/work/ForSDOServiceAdminClass:505-507
/branches/work/ToIFR_ID:509-514
Property changes on: trunk/jp.go.aist.rtm.RTC
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/RELENG_1_0/jp.go.aist.rtm.RTC:408-498
/branches/RELENG_1_0_0/jp.go.aist.rtm.RTC:60-401
/branches/work/ForSDOServiceAdminClass/jp.go.aist.rtm.RTC:505-507
/branches/work/ToIFR_ID/jp.go.aist.rtm.RTC:509-514
+ /branches/RELENG_1_0/jp.go.aist.rtm.RTC:408-498
/branches/RELENG_1_0_0/jp.go.aist.rtm.RTC:60-401
/branches/work/ForLogFormat/jp.go.aist.rtm.RTC:518-519
/branches/work/ForSDOServiceAdminClass/jp.go.aist.rtm.RTC:505-507
/branches/work/ToIFR_ID/jp.go.aist.rtm.RTC:509-514
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/DefaultConfiguration.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/DefaultConfiguration.java 2011-08-03 06:59:56 UTC (rev 519)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/DefaultConfiguration.java 2011-08-03 08:03:58 UTC (rev 520)
@@ -28,7 +28,7 @@
"os.hostname", "",
"logger.enable", "YES",
"logger.file_name", "./rtc%p.log",
- "logger.date_format", "%b %d %H:%M:%S",
+ "logger.date_format", "%b %d %H:%M:%S.%Q",
"logger.log_level", "INFO",
"logger.stream_lock", "NO",
"logger.master_logger", "",
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/log/Logbuf.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/log/Logbuf.java 2011-08-03 06:59:56 UTC (rev 519)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/log/Logbuf.java 2011-08-03 08:03:58 UTC (rev 520)
@@ -394,13 +394,15 @@
*/
public void setDateFormat(final String format) {
m_dateFormat = format.replace("%","%t");
+ m_dateFormat = m_dateFormat.replace("tQ","tL");
+ m_dateFormat = m_dateFormat.replace("tq","tN");
try {
StringBuilder sb = new StringBuilder();
Date date = new Date();
java.util.Formatter formatter = new java.util.Formatter(sb, java.util.Locale.US);
- formatter.format(m_dateFormat,date,date,date,date,date,date,date,date,date,date);
+ formatter.format(m_dateFormat,date,date,date,date,date,date,date,date,date,date,date,date);
} catch(IllegalFormatException ex){
- m_dateFormat = "%tb %td %tH:%tM:%tS";
+ m_dateFormat = "%tb %td %tH:%tM:%tS.%tL";
this.println(Logbuf.ERROR, "The specified format is illegal.");
}
}
@@ -440,7 +442,7 @@
/**
* <p>ログに付加する日付形式の書式</p>
*/
- private String m_dateFormat = "%tb %td %tH:%tM:%tS";
+ private String m_dateFormat = "%tb %td %tH:%tM:%tS.%tL";
/**
* <p>日付の後に付加するヘッダ</p>
openrtm-commit メーリングリストの案内