Provide more logging accuracy

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@38414 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2015-03-19 21:11:55 +00:00
parent 644b2caed5
commit 99d49c0e91
3 changed files with 17 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2015-03-19 Richard Frith-Macdonald <rfm@gnu.org>
* EcProcess.m:
* EcAlerter.m:
Use milliseconds in logging timestamps.
2015-02-02 Richard Frith-Macdonald <rfm@gnu.org>
* EcAlerter.h: Add options for time-limiting rule activity
@ -19,7 +25,7 @@
* GNUmakefile.preamble: fixup gcc flag filtering
* EcClientI.h:
* EcClientI.m:
EcClientI.m:
* EcCommand.m:
* EcControl.m:
* EcProcess.h:

View file

@ -1259,7 +1259,15 @@ replaceFields(NSDictionary *fields, NSString *template)
}
timestamp = [NSCalendarDate
dateWithString: [str substringToIndex: r.location]
calendarFormat: @"%Y-%m-%d %H:%M:%S %z"];
calendarFormat: @"%Y-%m-%d %H:%M:%S.%F %z"];
if (nil == timestamp)
{
/* Old style.
*/
timestamp = [NSCalendarDate
dateWithString: [str substringToIndex: r.location]
calendarFormat: @"%Y-%m-%d %H:%M:%S %z"];
}
str = [str substringFromIndex: NSMaxRange(r)];

View file

@ -460,7 +460,7 @@ cmdLogFormat(EcLogType t, NSString *fmt)
{
l = [[cmdDefs dictionaryRepresentation] copy];
}
d = [c descriptionWithCalendarFormat: @"%Y-%m-%d %H:%M:%S %z" locale: l];
d = [c descriptionWithCalendarFormat: @"%Y-%m-%d %H:%M:%S.%F %z" locale: l];
result = [stringClass stringWithFormat: @"%@(%@): %@ %@ - %@\n",
n, h, d, f, fmt];
RELEASE(c);