You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Teresa Batista Neto <te...@gmail.com> on 2013/03/13 14:55:29 UTC

How can I set a different TimeZone for the RequestLogger

Dear all,

I'm using wicket 1.5.9. In my log4j.xml I have:

<logger name="org.apache.wicket.protocol.http.RequestLogger">
        <level value="info"/>
</logger>

but when I'm testing my log file output is showing the request logger
information using GMT timezone and I need to be GMT+1. Does anybody knows
how I can do it?

E.g. of my log file output:

013-03-12 10:19:43 +0100 org.apache.wicket.protocol.http.RequestLogger
  INFO: startTime="2013-03-12 09:19:43,635",duration=0,....

Thanks in advance,
Teresa

Re: How can I set a different TimeZone for the RequestLogger

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Looking at org.apache.wicket.protocol.http.AbstractRequestLogger#formatDate
:

protected final String formatDate(final Date date)
{
 Args.notNull(date, "date");

final Calendar cal = Calendar.getInstance(Time.GMT);

i.e. there is no way at the moment. The method is final.
File a ticket if you like to remove the final from there.


On Wed, Mar 13, 2013 at 2:55 PM, Teresa Batista Neto <
teresa.batista.neto@gmail.com> wrote:

> Dear all,
>
> I'm using wicket 1.5.9. In my log4j.xml I have:
>
> <logger name="org.apache.wicket.protocol.http.RequestLogger">
>         <level value="info"/>
> </logger>
>
> but when I'm testing my log file output is showing the request logger
> information using GMT timezone and I need to be GMT+1. Does anybody knows
> how I can do it?
>
> E.g. of my log file output:
>
> 013-03-12 10:19:43 +0100 org.apache.wicket.protocol.http.RequestLogger
>   INFO: startTime="2013-03-12 09:19:43,635",duration=0,....
>
> Thanks in advance,
> Teresa
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>