[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Linux-cluster] Re: logging: more input



Hi guys,

I have received a bunch of comments and suggestions in my personal inbox
from people that didn't want to participate in the thread directly.

Some of them are absolutely valid points IMHO.

So here they are:

On Mon, 2008-11-10 at 20:09 +0100, Fabio M. Di Nitto wrote:

> == Output ==
> 
> to_file:
> 
> echo $(date "+%b %d %T") subsystem_or_daemon: entry_to_log
> Nov 10 19:46:40 subsystem_or_daemon: entry_to_log

Quoting:

--
I've not read any of the threads but did you consider a date format that
sorts easily i.e. YYYY MM DD-based?

And for investigating races across files/nodes using sub-second
timestamps (e.g. 19:46:40.123 ) and adding the node name.

So you can just extract relevant sections from several files, cat them
all together, sort them and then review the sequence of happenings.

If you're generalising, make the log format string a customisable option
similar to apache.
--

I agree that a more precise time and sortable format is a major winner.
He also has a good point to add the node name to the log.

My reply to the "customisable format" request was based on the
discussion we had at the Summit (that we want to avoid parsing lots of
different logging etc.) and his reply was:

Quoting:

--

1. Most people will use the default or one of the example lines you
supply.

2. If it is a problem, you've got the corresponding config line so it
should be straightforward to have a utility to convert it back to your
preferred canonical output format.
(And yes, "Nov 14" format can also be parsed and converted back into a
sortable format without much difficulty, so it's no big deal.)

3. If lots of people change the log format, then you probably chose a
poor default.

4. There's no reason why log-to-file should exactly match syslog format.
If you want syslog format, use syslog.  You want the best format to
assist you in debugging problems etc.

--

Fabio


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]