logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Georg Jansen" <Georg.Jan...@FaktNet.com>
Subject RE: Controlling the date format of the logged events
Date Thu, 27 Oct 2005 08:53:03 GMT
Hi Ofri.

If you are using PatternLayout (for example in the FileAppender) you 
can use the %utcdate instead of the %date, se example below:

<conversionPattern value="%utcdate [%thread] %-5level %logger [%ndc] -

Instead of 

<conversionPattern value="%date [%thread] %-5level %logger [%ndc] -

In the AdoNetAppender you can use  RawUtcTimeStamplayout instead of
RawTimeStampLayout when defining the layout of the log_date parameter:

<layout type="log4net.Layout.RawUtcTimeStampLayout"/>
Instead of the default:
<layout type="log4net.Layout.RawTimeStampLayout"/>

http://www.l4ndash.com - Log4Net Dashboard / Log Viewer

From: Ofri Sela [mailto:ofris@prolify.com] 
Sent: 27. oktober 2005 10:02
To: log4net-user@logging.apache.org
Subject: Controlling the date format of the logged events

In my application I need to be able to store my log messages date format as
UTC. It seems that the default used by log4net is local time format. Is
there a way to control the date time format (preferably through

Any help would be greatly appreciated. 


View raw message