[Red5devs] Log messages
Walter Tak
walter at waltertak.com
Thu Oct 30 09:45:29 PST 2008
> Mondain wrote:
>> My fellow devs..
>> When you create log messages please use this form
>>
>> log.error("Job {} execution failed", job.toString(), e);
>
>>From http://www.slf4j.org/apidocs/org/slf4j/Logger.html
> void error(String msg)
> void error(String format, Object arg)
> void error(String format, Object[] argArray)
> void error(String format, Object arg1, Object arg2)
> void error(String msg, Throwable t)
>
> Only the last form prints exception stacktrace to log.
>
> log.error("Job {} execution failed", job.toString(), e) invocation
> is handled by method error(String format, Object arg1, Object arg2).
> We have one {} mark, so only the first object (job name) goes to log
> message without exception and stacktrace.
ty for clarifying.
Since logging is the first step towards debugging an application imho the
way how to log should always be very good documented.
Please add to the wiki from (and to !) which specific revision this change
has been introduced to avoid questions of people using 0.6.3 / 0.7.0 or
brand new 1.0.x versions in the future. There is a lot of information about
Red5 on the web, nicely cached by mailinglists and currently a lot of the
information isn't correct anymore resulting in compilation errors and
frustration.
That can be prevented if we'd specify which versions are involved. It will
be obvious to you core developers but will be very very welcome for all
ordinary application developers that aren't used to quickly lookup the
syntax of that logger function.
That's what I made the more or less obvious post.
More information about the Red5devs
mailing list