Skip to content

Default logger format is confusing

The default format of log messages written to a "file" type stream currently looks like this:

{{{ 12 May 2009 13:23:1242131018 [3086264000] INFO gtts.ch.cern.socrates2.p:3228 <> - hyperdaq version: 03.10.00, compiled on Jan 24 2008 at 10:33:09 }}}

The date format seems nonsensical to me since the last part, where one would expect seconds (00-60), actually has a UNIX timestamp. This seems to come from the fact that in xdaq/src/common/ApplicationContextImpl.cc (line 668 in current HEAD) the default format contains a %s and not a %S (capital). I suggest replacing %s with a %S.%q since it is also quite convenient to see sub-second timestamps. Documentation of the pattern format is here:

http://log4cplus.sourceforge.net/docs/html/classlog4cplus_1_1PatternLayout.html

This all on SLC4.

Originally submitted on sourceforge.net by Thomas Themel ( themel-cern ) - 2009-05-12 15:16

Edited by Luciano Orsini
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information