You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by Knut Urdalen <kn...@telio.no> on 2005/11/30 00:20:01 UTC

Serializing LoggerLoggingEvent: Missing timestamp

Since I can't find any bug report database for log4php I'll post this to
the developer list.

LoggerAppenderSocket with useXml = false will serialize a
LoggerLoggingEvent over the network socket. Unserializing the logging
event on the other side I found that timestamp was missing. Checking the
code I see that there's an minor typo in LoggerLoggingEvent::__sleep()
function which will fix this.

Here's my minimal patch which solved the problem:

Index: src/log4php/spi/LoggerLoggingEvent.php
===================================================================
--- src/log4php/spi/LoggerLoggingEvent.php      (revision 349828)
+++ src/log4php/spi/LoggerLoggingEvent.php      (working copy)
@@ -365,7 +365,7 @@
             'ndc','ndcLookupRequired',
             'message','renderedMessage',
             'threadName',
-            'timestamp',
+            'timeStamp',
             'locationInfo'
         );
     }


Re: Serializing LoggerLoggingEvent: Missing timestamp

Posted by "Marco V." <ma...@apache.org>.
Patched.

Thank You.

-Marco

----- Original Message ----- 
From: "Knut Urdalen" <kn...@telio.no>
To: <lo...@logging.apache.org>
Sent: Wednesday, November 30, 2005 12:20 AM
Subject: Serializing LoggerLoggingEvent: Missing timestamp


> Since I can't find any bug report database for log4php I'll post this to
> the developer list.
> 
> LoggerAppenderSocket with useXml = false will serialize a
> LoggerLoggingEvent over the network socket. Unserializing the logging
> event on the other side I found that timestamp was missing. Checking the
> code I see that there's an minor typo in LoggerLoggingEvent::__sleep()
> function which will fix this.
> 
> Here's my minimal patch which solved the problem:
> 
> Index: src/log4php/spi/LoggerLoggingEvent.php
> ===================================================================
> --- src/log4php/spi/LoggerLoggingEvent.php      (revision 349828)
> +++ src/log4php/spi/LoggerLoggingEvent.php      (working copy)
> @@ -365,7 +365,7 @@
>              'ndc','ndcLookupRequired',
>              'message','renderedMessage',
>              'threadName',
> -            'timestamp',
> +            'timeStamp',
>              'locationInfo'
>          );
>      }
> 
>