remove trace in Task?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

remove trace in Task?

Eelco Hillenius
This code:

        if (log.isTraceEnabled())
        {
                log.trace("Run the job: " + code.toString());
        }

in Task looks completely unnecessary to me. Left-over of some debugging?

Is anyone against removing it?

Eelco
Reply | Threaded
Open this post in threaded view
|

Re: remove trace in Task?

Johan Compagner
somebody changed it from debug to trace so why is that done?


On 9/17/07, Eelco Hillenius <[hidden email]> wrote:

>
> This code:
>
>         if (log.isTraceEnabled())
>         {
>                 log.trace("Run the job: " + code.toString());
>         }
>
> in Task looks completely unnecessary to me. Left-over of some debugging?
>
> Is anyone against removing it?
>
> Eelco
>
Reply | Threaded
Open this post in threaded view
|

Re: remove trace in Task?

Eelco Hillenius
On 9/17/07, Johan Compagner <[hidden email]> wrote:
> somebody changed it from debug to trace so why is that done?

Yeah, and that can give annoying error messages depending on your config:

Exception in thread "ModificationWatcher Task"
java.lang.NoSuchMethodError: org.slf4j.Logger.isTraceEnabled()Z
        at org.apache.wicket.util.thread.Task$1.run(Task.java:103)

But even if it is debug, I don't really see the point of that logging
code there. If you're debugging, just put something temporary in there
or set a breakpoint. Right?

Eelco
Reply | Threaded
Open this post in threaded view
|

Re: remove trace in Task?

Johan Compagner
at runtime you use a wrong version of slf4j if you get that error

On 9/17/07, Eelco Hillenius <[hidden email]> wrote:

> On 9/17/07, Johan Compagner <[hidden email]> wrote:
> > somebody changed it from debug to trace so why is that done?
>
> Yeah, and that can give annoying error messages depending on your config:
>
> Exception in thread "ModificationWatcher Task"
> java.lang.NoSuchMethodError: org.slf4j.Logger.isTraceEnabled()Z
> at org.apache.wicket.util.thread.Task$1.run(Task.java:103)
>
> But even if it is debug, I don't really see the point of that logging
> code there. If you're debugging, just put something temporary in there
> or set a breakpoint. Right?
>
> Eelco
>
Reply | Threaded
Open this post in threaded view
|

Re: remove trace in Task?

Gerolf Seitz
>
> at runtime you use a wrong version of slf4j if you get that error


the quickstart archetype still uses version 1.0.1 for slf4j-log4j whereas
1.4.2 should be used.

  gerolf



On 9/17/07, Eelco Hillenius <[hidden email]> wrote:

> > On 9/17/07, Johan Compagner <[hidden email]> wrote:
> > > somebody changed it from debug to trace so why is that done?
> >
> > Yeah, and that can give annoying error messages depending on your
> config:
> >
> > Exception in thread "ModificationWatcher Task"
> > java.lang.NoSuchMethodError: org.slf4j.Logger.isTraceEnabled()Z
> >       at org.apache.wicket.util.thread.Task$1.run(Task.java:103)
> >
> > But even if it is debug, I don't really see the point of that logging
> > code there. If you're debugging, just put something temporary in there
> > or set a breakpoint. Right?
> >
> > Eelco
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: remove trace in Task?

rajeev_yadav
I have added slf4j-log4j 1.5.2 version and I am stillinig getting this error. Any suggestions which version is required to resolve this error.