You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Reinhard Deschler <re...@web.de> on 2001/03/15 22:30:27 UTC
[PATCH] for Class DatePatternConverter
Hi there,
following is a patch in DatePatternConverter, which formats the event-time
instead of the current time. This makes specially sense, when the events
are put in the CyclicBuffer.
Greeting
Reinhard Deschler from Germany
--- PatternParser.java Mon Jan 22 10:57:27 2001
+++ PatternParser.java.patch Thu Mar 15 20:28:07 2001
@@ -426,7 +426,7 @@
public
String convert(LoggingEvent event) {
- date.setTime(System.currentTimeMillis());
+ date.setTime(event.timeStamp);
return df.format(date);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
Re: [PATCH] for Class DatePatternConverter
Posted by Ceki Gülcü <cg...@qos.ch>.
Reinhard,
Your patch results in more accurate results. It's also faster. Good patch. Ceki
At 22:30 15.03.2001 +0100, Reinhard Deschler wrote:
>Hi there,
>
>following is a patch in DatePatternConverter, which formats the event-time
>
>instead of the current time. This makes specially sense, when the events
>
>are put in the CyclicBuffer.
>
>
>
>Greeting
>
>Reinhard Deschler from Germany
>
>--- PatternParser.java Mon Jan 22 10:57:27 2001
>+++ PatternParser.java.patch Thu Mar 15 20:28:07 2001
>@@ -426,7 +426,7 @@
>
> public
> String convert(LoggingEvent event) {
>- date.setTime(System.currentTimeMillis());
>+ date.setTime(event.timeStamp);
> return df.format(date);
> }
> }
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
I hope to see you at my ApacheCon 2001 presentation
entitled "Log4j, A Logging Package for Java".
See http://ApacheCon.Com/2001/US/ for more details.
----
Ceki Gülcü Web: http://qos.ch
av. de Rumine 5 email: cgu@qos.ch (preferred)
CH-1005 Lausanne ceki_gulcu@yahoo.com
Switzerland Tel: ++41 21 351 23 15
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org