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 Tim Dwelle <Ti...@aethersystems.com> on 2001/05/03 23:00:01 UTC
[PATCH] Logging Event
I have been using Log4J 1.1b6 to log messages that I pull
off a JMS publish-subscribe topic. I'd like the timeStamp
of the logging event to reflect the time the message was
sent via JMS, rather than the time our subscriber gets
around to logging the message.
The current LoggingEvent derives the timeStamp when it is
constructed, and that value cannot be changed (since the
attribute is final). Attached is a modified version of
LoggingEvent, with an alternate constructor allowing you
to specify the timeStamp of the event.
While I realize most people shouldn't need this... the
change is extremely trivial and does make the system more
flexible. And it would help me out a bunch!
Thanks.
- Tim Dwelle
tdwelle@aethersystems.com
Re: [PATCH] Logging Event
Posted by Mathias Bogaert <pa...@pandora.be>.
Sent = when sent via JMS......logical.
+1
Regards,
Mathias
----- Original Message -----
From: "Tim Dwelle" <Ti...@aethersystems.com>
To: <lo...@jakarta.apache.org>
Sent: Thursday, May 03, 2001 11:00 PM
Subject: [PATCH] Logging Event
> I have been using Log4J 1.1b6 to log messages that I pull
> off a JMS publish-subscribe topic. I'd like the timeStamp
> of the logging event to reflect the time the message was
> sent via JMS, rather than the time our subscriber gets
> around to logging the message.
>
> The current LoggingEvent derives the timeStamp when it is
> constructed, and that value cannot be changed (since the
> attribute is final). Attached is a modified version of
> LoggingEvent, with an alternate constructor allowing you
> to specify the timeStamp of the event.
>
> While I realize most people shouldn't need this... the
> change is extremely trivial and does make the system more
> flexible. And it would help me out a bunch!
>
> Thanks.
>
> - Tim Dwelle
> tdwelle@aethersystems.com
>
>
>
----------------------------------------------------------------------------
----
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
Re: [PATCH] Logging Event
Posted by Ceki Gulcu <ce...@yahoo.com>.
Hi Tim,
Thanks for the new LoggingEvent.java file. As a side
note, please keep in mind that unified diffs (diff -u)
is the preferred way for suppying patches. This is
clearly not a big deal.
Coming back to the question of the timestamp, let me
say that the LoggingEvent class is designed with
safety and speed in mind, not flexiblity. This can be
considered as a design trade off (flaw?). It seems to
me that the fact that you could retrofit your
requirement to the existing design (with very little
modification) is due to your creativity and a pinch of
luck.
I am not sure other requirements could be added with
such ease. We should perhaps take the time to review
the design of the LoggingEvent class with more
flexibility in mind.
Paul Glezen is known to have opinions on the
subject.... Cheers, Ceki
--- Tim Dwelle <Ti...@aethersystems.com> wrote:
> I have been using Log4J 1.1b6 to log messages that I
> pull
> off a JMS publish-subscribe topic. I'd like the
> timeStamp
> of the logging event to reflect the time the message
> was
> sent via JMS, rather than the time our subscriber
> gets
> around to logging the message.
>
> The current LoggingEvent derives the timeStamp when
> it is
> constructed, and that value cannot be changed (since
> the
> attribute is final). Attached is a modified version
> of
> LoggingEvent, with an alternate constructor allowing
> you
> to specify the timeStamp of the event.
>
> While I realize most people shouldn't need this...
> the
> change is extremely trivial and does make the system
> more
> flexible. And it would help me out a bunch!
>
> Thanks.
>
> - Tim Dwelle
> tdwelle@aethersystems.com
>
>
>
> ATTACHMENT part 2 application/octet-stream
name=LoggingEvent.java
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> log4j-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
log4j-dev-help@jakarta.apache.org
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org