Yup :)  Martin's right, this is a bad way of doing it!

You should be getting a logger for your own class. So when the logger does
log - it knows where the errors come from and helps you create proper stack
traces.
You'll also have better control over log levels for different
classes/packages in the future.

    private static final Logger log =
LoggerFactory.getLogger(CurrentClassHere.class);

- Alex 

-----Original Message-----
From: Martin Makundi [mailto:[email protected]] 
Sent: Thursday, July 15, 2010 4:15 AM
To: [email protected]
Subject: Re: Logging

That's a whole another story ... ;)

**
Martin

2010/7/15 Josh Kamau <[email protected]>:
> Thanks Martin. I wanted to make sure am doing the right thing..
>
> Regards.
> On Thu, Jul 15, 2010 at 10:59 AM, Martin Makundi < 
> [email protected]> wrote:
>
>>        private static final Logger log = 
>> LoggerFactory.getLogger(WebPage.class);
>>
>>
>> 2010/7/15 Josh Kamau <[email protected]>:
>> > Hi guys;
>> >
>> > I know wicket comes with pre configured logging . How do i get hold 
>> > of
>> the
>> > Logger object so that i can log messages in my pages and panels?
>> >
>> > regards.
>> >
>> > Josh.
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to