[prev in list] [next in list] [prev in thread] [next in thread] 

List:       slf4j-user
Subject:    Re: [slf4j-user] Serializable log adapters
From:       Ceki =?iso-8859-1?Q?G=FClc=FC?= <listid () qos ! ch>
Date:       2007-03-13 21:05:56
Message-ID: 6.0.0.22.0.20070313215539.03b29330 () mail ! qos ! ch
[Download RAW message or body]

At 06:41 AM 3/13/2007, Trustin Lee wrote:

>Implementing readResolve() for every class with a logger field is 
>painful.  Would there be any easier way?  Of course, the easiest solution 
>is not to use logger for serializable objects, which might make sense.

Assuming the serialized object (once transmitted to the remote host) does 
not need to log (while located on the remote host), there are two options.

1) You could mark the member variable referring to org.slf4j.Logger as 
"transient".
2) We could have org.slf4j.Logger extend java.io.Serializable.

Option 1 is relatively easy to do, as long as you have access to the source 
code. Option 2, would also be very easy to accomplish, except that it gives 
the (wrong) impression that a serialized logger can serve a meaningful 
purpose, which unless you go into violent readResolve() contortions, it 
does not.

Let us see if we get other complaints about this issue. If not, I am 
inclined to think that we leave things as is.

>Trustin

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch

_______________________________________________
user mailing list
user@slf4j.org
http://www.slf4j.org/mailman/listinfo/user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic