You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Marcel Reutegger <ma...@gmx.net> on 2005/02/04 14:54:46 UTC

error messages in logs

Hi all,

after adding more api test cases to jackrabbit which test exception 
conditions on methods, I notices that error log messages are written in 
certain cases, even though the test succeeds. 
SaveTest.testConstraintViolationException is an example.

Reason is, that we sometimes log an error message before an exception is 
thrown. I suggest to lower the log level for such messages to at least 
warn or even info. Taking whatever action is needed should be the 
responsibility of the caller.

opinions?

regards,
  marcel

Re: error messages in logs

Posted by Marcel Reutegger <ma...@gmx.net>.
> 
> i agree. logging/log levels are used inconsistently. it's one of the 
> open tasks in the ToDo.txt:
> 
> - logging: remove unnecessary output, check log categories/verbosity, 
>   use 'debug' whenever possible
>     
> i just didn't get around to review/change all logging stmts yet :(.
> 

ok, done. I just changed all log.error() calls to log.debug() whenever 
an exception is immediately re-thrown.

cheers
  marcel

Re: error messages in logs

Posted by Stefan Guggisberg <st...@gmail.com>.
On Fri, 04 Feb 2005 14:54:46 +0100, Marcel Reutegger
<ma...@gmx.net> wrote:
> Hi all,
> 
> after adding more api test cases to jackrabbit which test exception
> conditions on methods, I notices that error log messages are written in
> certain cases, even though the test succeeds.
> SaveTest.testConstraintViolationException is an example.
> 
> Reason is, that we sometimes log an error message before an exception is
> thrown. I suggest to lower the log level for such messages to at least
> warn or even info. Taking whatever action is needed should be the
> responsibility of the caller.
> 
> opinions?

i agree. logging/log levels are used inconsistently. it's one of the 
open tasks in the ToDo.txt:

- logging: remove unnecessary output, check log categories/verbosity, 
  use 'debug' whenever possible
    
i just didn't get around to review/change all logging stmts yet :(.

cheers
stefan

> 
> regards,
>   marcel
>