I'm looking for a style guide to log messages:
For example:
i.e. what makes a good / bad log message string
I'm particularly interested in what make a good log string - beyond including the TIME, SEVERITY and COMPONENT, as I tend to use log4j which gives me this information for free.
In computing, a log file is a file that records either events that occur in an operating system or other software runs, or messages between different users of communication software. Logging is the act of keeping a log. In the simplest case, messages are written to a single log file.
Whatever you decide, if it's a text log, start each line with a good timestamp in, preferably, ISO format:
YYYY-MM-DDTHH:MM:SS.mmm
In all likelihood, you will want to follow the timestamp with a severity code.
Some good logging guidelines can be found here:
http://watchitlater.com/blog/2009/12/logging-guidelines/
and here
http://download.oracle.com/docs/cd/B32110_01/web.1013/b28952/logging.htm
That really depends on your application. I may draw inspiration from anything at /var/log/*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With