You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Thomas Saxtoft <TS...@sondagsavisen.dk> on 2002/11/29 08:49:34 UTC

Object logger

Being responsible for log4j in the company where I work, I got the
question if a object logger exists.
It should be a logger that takes a serializable object and serializes it
to the appender. Then when an exception occurs we can go back and see
the actual state of the objects as they where when the exception
occurred.
Does it exists and if not, what do you think of the idea?

Thomas Saxtoft

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Object logger

Posted by "Igor G." <ig...@yahoo.com>.
I agree with Thomas in general, but certain classes could be an exception from
"use toString()" rule.

We have coded special cases for Exceptions, Node and some other objects that
are specific to our application.

--- Thomas Muller <tt...@online.no> wrote:
> 
> | It should be a logger that takes a serializable object and serializes it
> | to the appender. Then when an exception occurs we can go back and see
> | the actual state of the objects as they where when the exception
> | occurred.
> | Does it exists and if not, what do you think of the idea?
> 
> I think you're stretching the responsibilities of a logging system a bit. In
> my opinion, the toString method of an object should always reflect its state
> (in a legible manner), thereby making the need for serialization redundant.
> Also, serialized object are unreadable for humans, and as far as I can see
> the philosofy behind Log4j is directed towards human readable log files.
> Serializing objects would also impose a substantial time/memory consumtion
> issue.
> 
> Cheers,
> 
> --
> 
> Thomas
> 
> 
> 
> 
> *************************************************************************
> Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. 
> The information supplied in this Commercial Communication should be treated
> in confidence.
> No liability whatsoever is accepted for any loss or damage 
> suffered as a result of accessing this message or any attachments.
> 
> ________________________________________________________________________
> This email has been scanned for all viruses by the MessageLabs SkyScan
> service. For more information on a proactive anti-virus service working
> around the clock, around the globe, visit http://www.messagelabs.com
> ________________________________________________________________________
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Object logger

Posted by Thomas Muller <tt...@online.no>.
| It should be a logger that takes a serializable object and serializes it
| to the appender. Then when an exception occurs we can go back and see
| the actual state of the objects as they where when the exception
| occurred.
| Does it exists and if not, what do you think of the idea?

I think you're stretching the responsibilities of a logging system a bit. In
my opinion, the toString method of an object should always reflect its state
(in a legible manner), thereby making the need for serialization redundant.
Also, serialized object are unreadable for humans, and as far as I can see
the philosofy behind Log4j is directed towards human readable log files.
Serializing objects would also impose a substantial time/memory consumtion
issue.

Cheers,

--

Thomas




*************************************************************************
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. 
The information supplied in this Commercial Communication should be treated
in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>