[slf4j-user] How to write good log message?
Ceki Gulcu
listid at qos.ch
Tue Nov 6 19:32:15 CET 2007
Writing good log messages is a bit like writing good code. You may encouter wild
variations in quality as well as style.
Anyway, my suggestion would be to go over the logs which each developer and show
them better ways of coming up with informative log messages, on a case by case
basis. With some experience, you might actually have enough data points to write
a useful guideline document.
HTH,
hezjing wrote:
> Hi
>
> In my company, there are different developer working on the same
> project and each has their own style of writting log messages.
>
> Some use active, some use pasive, some print the exception message,
> whereas some will print the entire stack trace, and the worst, some
> simply print the variable=value without any description!
>
> So my log file contains the messages in various styles and it is
> difficult to read.
>
> How do you do it your company?
> Do you follow any guideline and convention to write a good log message?
>
>
--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
More information about the slf4j-user
mailing list