New log file header

Alexander Gottwald
Fri Mar 5 18:35:00 GMT 2004

On Fri, 5 Mar 2004, Takuma Murakami wrote:

> > > 2. Could you add a time-stamp at beginning of each line ?
> > >    I tried to correspond the log messages with external actions (i.e.
> > >    copy/paste and Emacs errors) and the time stamp could help.
> > 
> > That is an interesting idea.  I think we can do something like that 
> > because we have a single "ErrorF" function that handles printing the log 
> > messages.  We should be able to modify this one function to get 
> > timestamps on all entries... but it may not look too pretty since it 
> > will mess with multiple-line error messages that come from other parts 
> > of the source code.  If those lines are printed with multiple ErrorF 
> > calls, then things will line up correctly.  However, if they are printed 
> > with a single call to ErrorF with multiple "\n"'s, then it may not look 
> > so good.  Of course, we could substitute each "\n" in the format string 
> > (except for the last) with "\n%TIME%", which would help to keep things 
> > aligned.
> > 
> > I dunno... I will have to think about this a bit.
> In my humble opinion, time stamps are very good for debugging
> but might be slightly too verbose for average users.  Additionally
> it could reduce readability of log files.
> I think a kind of log level (verbosity level) is desired so
> that XWiin will print time stamps if -verbose or -debug flag
> is specified.  However I can't contribute right now so I honor
> implementor's choice.

There is already a -loglevel switch. All logfunction (ErrorF, winErrorVerb ...)
will end up in winMsg (AFAIR). You can add the timestamp there. currently the 
default loglevel is 2 (afair). Maybe loglevel 3 or 4 is a good choice for 
adding the timestamp.

--           ICQ: 126018723
 Chemnitzer Linux-Tag 2004 - 6. und 7. März 2004

More information about the Cygwin-xfree mailing list