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 Mikael Ståldal <mi...@magine.com> on 2016/07/21 10:14:45 UTC

Serializable Logger

AbstractLogger is Serializable, but the Logger interface is not. Why is it
so?

-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Matt Sicker <bo...@gmail.com>.
Is that generally a followed pattern? The JDK itself isn't even consistent
in that regard (e.g., Lock isn't serializable, but all its implementations
are).

On 22 July 2016 at 02:45, Mikael Ståldal <mi...@magine.com> wrote:

> But if this is a feature that is useful for some users, why not fully
> advertise it by making the Logger interface Serializable?
>
> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com> wrote:
>
>> It's Serializable because there was a feature request for it. The jira
>> ticket is internal (reported by Gary), but I recall either another bug or a
>> mailing list post where the justification was so that serializable classes
>> can still use a Logger instance field (not everyone uses a static field for
>> the Logger for some reason).
>>
>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com> wrote:
>>
>>> I asked myself the same question and I guess the answer is that Logger
>>> is included in lots of classes, many of which are Serializable. It would be
>>> easier for us to make AbstractLogger Serializable then for all the users to
>>> mark it as transient and have to manually instantiate the Logger during
>>> de-Serialization.
>>>
>>> Ralph
>>>
>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <mi...@magine.com>
>>> wrote:
>>>
>>> So then why is AbstractLogger, and our implementation in log4j-core,
>>> Serializable?
>>>
>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <ga...@gmail.com>
>>> wrote:
>>>
>>>> I do not think there is a way to know what folks are doing out there...
>>>>
>>>> Gary
>>>>
>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>> mikael.staldal@magine.com> wrote:
>>>>
>>>>> Are there any providers not using AbstractLogger?
>>>>>
>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Probably to leave the decision on whether to support serialization to
>>>>>> each provider.
>>>>>>
>>>>>> Gary
>>>>>>
>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mi...@magine.com>
>>>>>> wrote:
>>>>>>
>>>>>>> AbstractLogger is Serializable, but the Logger interface is not. Why
>>>>>>> is it so?
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>> Java Persistence with Hibernate, Second Edition
>>>> <http://www.manning.com/bauer3/>
>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>> Blog: http://garygregory.wordpress.com
>>>> Home: http://garygregory.com/
>>>> Tweet! http://twitter.com/GaryGregory
>>>>
>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>>
>>>
>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
Matt Sicker <bo...@gmail.com>

Re: Serializable Logger

Posted by Ralph Goers <ra...@dslextreme.com>.
That would be one way to find out how many custom implementations there are. I bet nearly every one of them would complain.

Ralph

> On Jul 25, 2016, at 9:56 AM, Matt Sicker <bo...@gmail.com> wrote:
> 
> Wouldn't it also be kind of an evil thing to do by adding Serializable to Logger mid-2.x? That kind of decision seems to be an x.0 type of decision.
> 
> On 25 July 2016 at 11:55, Gary Gregory <garydgregory@gmail.com <ma...@gmail.com>> wrote:
> Roger that. I suppose that we could make that part of an epic and note that Log4j's own implementations are fully supported (or not and which ones).
> 
> I'm still not convinced that this is a "good thing" at the interface level because we could only document what each of our Logger implementations support instead without "forcing" the interface on other 3rd party impls (which I have no idea if there are any.)
> 
> Gary
> 
> On Mon, Jul 25, 2016 at 9:43 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
> The purpose is that the user of Log4j can be sure that the Logger is serializable.
> 
> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <garydgregory@gmail.com <ma...@gmail.com>> wrote:
> But to what purpose? Does Log4j itself need this? Is this a case of YAGNI?
> 
> If I have a Logger in an object I serialize, and the class implementing Logger is serializable, then I am good to go.
> 
> Making Logger Serializable, would make this obvious to users and might make some developers warm and fuzzy. It just seems like an odd requirement for ALL implementors of Loggers to be serializable. As a third party Logger implementor, that does not mean it would be done properly. Implementing the interface is no guarantee of proper behavior. 
> 
> Overall, it seems like it would make Log4j less friendly to 3rd party implementors. Are there even any? 
> 
> Gary
> 
> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
> But maybe we actually want to force all implementations to be serializable?
> 
> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <remko.popma@gmail.com <ma...@gmail.com>> wrote:
> I think the theory is it is preferable to let implementors of an interface implement java.io.Serializable instead of letting the interface extend java.io.Serializable. That gives future implementors the freedom to choose to either implement Serializable or not.
> 
> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
> It seems like serializable logger is useful in Apache Spark, which is popular to use from Scala.
> 
> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <boards@gmail.com <ma...@gmail.com>> wrote:
> Do Scala programmers use Serializable a lot, or is there a better mechanism there? Because if there's a more Scala way of doing it, that would make more sense. Otherwise, you can always add Serializable later, but you shouldn't remove it once it's part of the public API.
> 
> On 25 July 2016 at 03:06, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
> I am asking this since I'm considering making the Scala Logger wrapper Serializable. Would that be a good idea?
> 
> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
> Users can rely on the fact that loggers are always Serializable.
> 
> I guess we could also document that fact if we don't want to mark the interface Serializable.
> 
> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <ralph.goers@dslextreme.com <ma...@dslextreme.com>> wrote:
> What advantage is gained by declaring the interface Serializable?
> 
> Ralph
> 
>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
>> 
>> I don't think we should limit ourselves to what we add to the API just for the sake of alternative implementations.
>> 
>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <garydgregory@gmail.com <ma...@gmail.com>> wrote:
>> I do not think you want to _force_ all implementation to be serializable. Serialization is not a main feature of loggers, logging is.
>> 
>> Gary
>> 
>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
>> But if this is a feature that is useful for some users, why not fully advertise it by making the Logger interface Serializable?
>> 
>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <boards@gmail.com <ma...@gmail.com>> wrote:
>> It's Serializable because there was a feature request for it. The jira ticket is internal (reported by Gary), but I recall either another bug or a mailing list post where the justification was so that serializable classes can still use a Logger instance field (not everyone uses a static field for the Logger for some reason).
>> 
>> On 21 July 2016 at 11:32, Ralph Goers <ralph.goers@dslextreme.com <ma...@dslextreme.com>> wrote:
>> I asked myself the same question and I guess the answer is that Logger is included in lots of classes, many of which are Serializable. It would be easier for us to make AbstractLogger Serializable then for all the users to mark it as transient and have to manually instantiate the Logger during de-Serialization.
>> 
>> Ralph
>> 
>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
>>> 
>>> So then why is AbstractLogger, and our implementation in log4j-core, Serializable?
>>> 
>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <garydgregory@gmail.com <ma...@gmail.com>> wrote:
>>> I do not think there is a way to know what folks are doing out there...
>>> 
>>> Gary
>>> 
>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
>>> Are there any providers not using AbstractLogger?
>>> 
>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <garydgregory@gmail.com <ma...@gmail.com>> wrote:
>>> Probably to leave the decision on whether to support serialization to each provider.
>>> 
>>> Gary
>>> 
>>> 
>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mikael.staldal@magine.com <ma...@magine.com>> wrote:
>>> AbstractLogger is Serializable, but the Logger interface is not. Why is it so?
>>> 
>>> -- 
>>>  
>>> 
>>> Mikael Ståldal
>>> Senior software developer 
>>> 
>>> Magine TV
>>> mikael.staldal@magine.com <ma...@magine.com>    
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
>>> 
>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>> you should destroy this message and kindly notify the sender by reply email.   
>>> 
>>> 
>>> 
>>> -- 
>>>  
>>> 
>>> Mikael Ståldal
>>> Senior software developer 
>>> 
>>> Magine TV
>>> mikael.staldal@magine.com <ma...@magine.com>    
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
>>> 
>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>> you should destroy this message and kindly notify the sender by reply email.   
>>> 
>>> 
>>> 
>>> -- 
>>> E-Mail: garydgregory@gmail.com <ma...@gmail.com> | ggregory@apache.org  <ma...@apache.org>
>>> Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/>
>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>> Spring Batch in Action <http://www.manning.com/templier/>
>>> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> 
>>> Home: http://garygregory.com/ <http://garygregory.com/>
>>> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
>>> 
>>> 
>>> -- 
>>>  
>>> 
>>> Mikael Ståldal
>>> Senior software developer 
>>> 
>>> Magine TV
>>> mikael.staldal@magine.com <ma...@magine.com>    
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
>>> 
>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>> you should destroy this message and kindly notify the sender by reply email.   
>> 
>> 
>> 
>> 
>> -- 
>> Matt Sicker <boards@gmail.com <ma...@gmail.com>>
>> 
>> 
>> 
>> -- 
>>  
>> 
>> Mikael Ståldal
>> Senior software developer 
>> 
>> Magine TV
>> mikael.staldal@magine.com <ma...@magine.com>    
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
>> 
>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>> you should destroy this message and kindly notify the sender by reply email.   
>> 
>> 
>> 
>> -- 
>> E-Mail: garydgregory@gmail.com <ma...@gmail.com> | ggregory@apache.org  <ma...@apache.org>
>> Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> 
>> Home: http://garygregory.com/ <http://garygregory.com/>
>> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
>> 
>> 
>> -- 
>>  
>> 
>> Mikael Ståldal
>> Senior software developer 
>> 
>> Magine TV
>> mikael.staldal@magine.com <ma...@magine.com>    
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
>> 
>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> -- 
> Matt Sicker <boards@gmail.com <ma...@gmail.com>>
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> -- 
> E-Mail: garydgregory@gmail.com <ma...@gmail.com> | ggregory@apache.org  <ma...@apache.org>
> Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> 
> Home: http://garygregory.com/ <http://garygregory.com/>
> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> -- 
> E-Mail: garydgregory@gmail.com <ma...@gmail.com> | ggregory@apache.org  <ma...@apache.org>
> Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> 
> Home: http://garygregory.com/ <http://garygregory.com/>
> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
> 
> 
> -- 
> Matt Sicker <boards@gmail.com <ma...@gmail.com>>


Re: Serializable Logger

Posted by Matt Sicker <bo...@gmail.com>.
Wouldn't it also be kind of an evil thing to do by adding Serializable to
Logger mid-2.x? That kind of decision seems to be an x.0 type of decision.

On 25 July 2016 at 11:55, Gary Gregory <ga...@gmail.com> wrote:

> Roger that. I suppose that we could make that part of an epic and note
> that Log4j's own implementations are fully supported (or not and which
> ones).
>
> I'm still not convinced that this is a "good thing" at the interface level
> because we could only document what each of our Logger implementations
> support instead without "forcing" the interface on other 3rd party impls
> (which I have no idea if there are any.)
>
> Gary
>
> On Mon, Jul 25, 2016 at 9:43 AM, Mikael Ståldal <mikael.staldal@magine.com
> > wrote:
>
>> The purpose is that the user of Log4j can be sure that the Logger is
>> serializable.
>>
>> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>>
>>> But to what purpose? Does Log4j itself need this? Is this a case of
>>> YAGNI?
>>>
>>> If I have a Logger in an object I serialize, and the class implementing
>>> Logger is serializable, then I am good to go.
>>>
>>> Making Logger Serializable, would make this obvious to users and might
>>> make some developers warm and fuzzy. It just seems like an odd requirement
>>> for ALL implementors of Loggers to be serializable. As a third party Logger
>>> implementor, that does not mean it would be done properly. Implementing the
>>> interface is no guarantee of proper behavior.
>>>
>>> Overall, it seems like it would make Log4j less friendly to 3rd party
>>> implementors. Are there even any?
>>>
>>> Gary
>>>
>>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <
>>> mikael.staldal@magine.com> wrote:
>>>
>>>> But maybe we actually want to force all implementations to be
>>>> serializable?
>>>>
>>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com>
>>>> wrote:
>>>>
>>>>> I think the theory is it is preferable to let implementors of an
>>>>> interface implement java.io.Serializable instead of letting the interface
>>>>> extend java.io.Serializable. That gives future implementors the freedom to
>>>>> choose to either implement Serializable or not.
>>>>>
>>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
>>>>> mikael.staldal@magine.com> wrote:
>>>>>
>>>>>> It seems like serializable logger is useful in Apache Spark, which is
>>>>>> popular to use from Scala.
>>>>>>
>>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Do Scala programmers use Serializable a lot, or is there a better
>>>>>>> mechanism there? Because if there's a more Scala way of doing it, that
>>>>>>> would make more sense. Otherwise, you can always add Serializable later,
>>>>>>> but you shouldn't remove it once it's part of the public API.
>>>>>>>
>>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I am asking this since I'm considering making the Scala Logger
>>>>>>>> wrapper Serializable. Would that be a good idea?
>>>>>>>>
>>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>
>>>>>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>>>>>
>>>>>>>>> I guess we could also document that fact if we don't want to mark
>>>>>>>>> the interface Serializable.
>>>>>>>>>
>>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>
>>>>>>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>>>>>>
>>>>>>>>>> Ralph
>>>>>>>>>>
>>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>
>>>>>>>>>> I don't think we should limit ourselves to what we add to the API
>>>>>>>>>> just for the sake of alternative implementations.
>>>>>>>>>>
>>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> I do not think you want to _force_ all implementation to be
>>>>>>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>>
>>>>>>>>>>> Gary
>>>>>>>>>>>
>>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> But if this is a feature that is useful for some users, why not
>>>>>>>>>>>> fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> It's Serializable because there was a feature request for it.
>>>>>>>>>>>>> The jira ticket is internal (reported by Gary), but I recall either another
>>>>>>>>>>>>> bug or a mailing list post where the justification was so that serializable
>>>>>>>>>>>>> classes can still use a Logger instance field (not everyone uses a static
>>>>>>>>>>>>> field for the Logger for some reason).
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <
>>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> I asked myself the same question and I guess the answer is
>>>>>>>>>>>>>> that Logger is included in lots of classes, many of which are Serializable.
>>>>>>>>>>>>>> It would be easier for us to make AbstractLogger Serializable then for all
>>>>>>>>>>>>>> the users to mark it as transient and have to manually instantiate the
>>>>>>>>>>>>>> Logger during de-Serialization.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I do not think there is a way to know what folks are doing
>>>>>>>>>>>>>>> out there...
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface
>>>>>>>>>>>>>>>>>> is not. Why is it so?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>
>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>
>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>
>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>>> reply email.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>
>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>> Senior software developer
>>>>>>>>>>
>>>>>>>>>> *Magine TV*
>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>
>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>> reply email.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [image: MagineTV]
>>>>>>>>>
>>>>>>>>> *Mikael Ståldal*
>>>>>>>>> Senior software developer
>>>>>>>>>
>>>>>>>>> *Magine TV*
>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>
>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>> reply email.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> [image: MagineTV]
>>>>>>>>
>>>>>>>> *Mikael Ståldal*
>>>>>>>> Senior software developer
>>>>>>>>
>>>>>>>> *Magine TV*
>>>>>>>> mikael.staldal@magine.com
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>
>>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>> reply email.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>> *Mikael Ståldal*
>>>>>> Senior software developer
>>>>>>
>>>>>> *Magine TV*
>>>>>> mikael.staldal@magine.com
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>
>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>> message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>> you should destroy this message and kindly notify the sender by reply
>>>>>> email.
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>
>>>
>>>
>>> --
>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>> Java Persistence with Hibernate, Second Edition
>>> <http://www.manning.com/bauer3/>
>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>> Spring Batch in Action <http://www.manning.com/templier/>
>>> Blog: http://garygregory.wordpress.com
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory
>>>
>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
Matt Sicker <bo...@gmail.com>

Re: Serializable Logger

Posted by Gary Gregory <ga...@gmail.com>.
Roger that. I suppose that we could make that part of an epic and note that
Log4j's own implementations are fully supported (or not and which ones).

I'm still not convinced that this is a "good thing" at the interface level
because we could only document what each of our Logger implementations
support instead without "forcing" the interface on other 3rd party impls
(which I have no idea if there are any.)

Gary

On Mon, Jul 25, 2016 at 9:43 AM, Mikael Ståldal <mi...@magine.com>
wrote:

> The purpose is that the user of Log4j can be sure that the Logger is
> serializable.
>
> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <ga...@gmail.com>
> wrote:
>
>> But to what purpose? Does Log4j itself need this? Is this a case of YAGNI?
>>
>> If I have a Logger in an object I serialize, and the class implementing
>> Logger is serializable, then I am good to go.
>>
>> Making Logger Serializable, would make this obvious to users and might
>> make some developers warm and fuzzy. It just seems like an odd requirement
>> for ALL implementors of Loggers to be serializable. As a third party Logger
>> implementor, that does not mean it would be done properly. Implementing the
>> interface is no guarantee of proper behavior.
>>
>> Overall, it seems like it would make Log4j less friendly to 3rd party
>> implementors. Are there even any?
>>
>> Gary
>>
>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <
>> mikael.staldal@magine.com> wrote:
>>
>>> But maybe we actually want to force all implementations to be
>>> serializable?
>>>
>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com>
>>> wrote:
>>>
>>>> I think the theory is it is preferable to let implementors of an
>>>> interface implement java.io.Serializable instead of letting the interface
>>>> extend java.io.Serializable. That gives future implementors the freedom to
>>>> choose to either implement Serializable or not.
>>>>
>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
>>>> mikael.staldal@magine.com> wrote:
>>>>
>>>>> It seems like serializable logger is useful in Apache Spark, which is
>>>>> popular to use from Scala.
>>>>>
>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>>
>>>>>> Do Scala programmers use Serializable a lot, or is there a better
>>>>>> mechanism there? Because if there's a more Scala way of doing it, that
>>>>>> would make more sense. Otherwise, you can always add Serializable later,
>>>>>> but you shouldn't remove it once it's part of the public API.
>>>>>>
>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com>
>>>>>> wrote:
>>>>>>
>>>>>>> I am asking this since I'm considering making the Scala Logger
>>>>>>> wrapper Serializable. Would that be a good idea?
>>>>>>>
>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>
>>>>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>>>>
>>>>>>>> I guess we could also document that fact if we don't want to mark
>>>>>>>> the interface Serializable.
>>>>>>>>
>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>
>>>>>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>>>>>
>>>>>>>>> Ralph
>>>>>>>>>
>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>
>>>>>>>>> I don't think we should limit ourselves to what we add to the API
>>>>>>>>> just for the sake of alternative implementations.
>>>>>>>>>
>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> I do not think you want to _force_ all implementation to be
>>>>>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>
>>>>>>>>>> Gary
>>>>>>>>>>
>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> But if this is a feature that is useful for some users, why not
>>>>>>>>>>> fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> It's Serializable because there was a feature request for it.
>>>>>>>>>>>> The jira ticket is internal (reported by Gary), but I recall either another
>>>>>>>>>>>> bug or a mailing list post where the justification was so that serializable
>>>>>>>>>>>> classes can still use a Logger instance field (not everyone uses a static
>>>>>>>>>>>> field for the Logger for some reason).
>>>>>>>>>>>>
>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <
>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> I asked myself the same question and I guess the answer is
>>>>>>>>>>>>> that Logger is included in lots of classes, many of which are Serializable.
>>>>>>>>>>>>> It would be easier for us to make AbstractLogger Serializable then for all
>>>>>>>>>>>>> the users to mark it as transient and have to manually instantiate the
>>>>>>>>>>>>> Logger during de-Serialization.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> I do not think there is a way to know what folks are doing
>>>>>>>>>>>>>> out there...
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface
>>>>>>>>>>>>>>>>> is not. Why is it so?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>
>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>
>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>> Senior software developer
>>>>>>>>>>>
>>>>>>>>>>> *Magine TV*
>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>>
>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>> reply email.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [image: MagineTV]
>>>>>>>>>
>>>>>>>>> *Mikael Ståldal*
>>>>>>>>> Senior software developer
>>>>>>>>>
>>>>>>>>> *Magine TV*
>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>
>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>> reply email.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> [image: MagineTV]
>>>>>>>>
>>>>>>>> *Mikael Ståldal*
>>>>>>>> Senior software developer
>>>>>>>>
>>>>>>>> *Magine TV*
>>>>>>>> mikael.staldal@magine.com
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>
>>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>> reply email.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition
>> <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Serializable Logger

Posted by Remko Popma <re...@gmail.com>.
I haven't tried. 

Sent from my iPhone

> On 2016/07/26, at 20:08, Mikael Ståldal <mi...@magine.com> wrote:
> 
> It seems like this should be the case already:
> 
> https://issues.apache.org/jira/browse/LOG4J2-801
> 
> What about AsyncLogger though?
> 
>> On Tue, Jul 26, 2016 at 12:07 PM, Mikael Ståldal <mi...@magine.com> wrote:
>> That deserialized loggers work (given that all needed dependencies are on classpath) is a reasonable expectation. If we cannot guarantee that, then we should not declare that loggers are serializable.
>> 
>>> On Tue, Jul 26, 2016 at 11:45 AM, Remko Popma <re...@gmail.com> wrote:
>>> Sure. What is the expectation here?
>>> Do deserialized Loggers work?
>>> 
>>> Sent from my iPhone
>>> 
>>>> On 2016/07/26, at 17:26, Mikael Ståldal <mi...@magine.com> wrote:
>>>> 
>>>> Can we at least document that we guarantee that Loggers from log4j-impl are always serializable?
>>>> 
>>>>> On Tue, Jul 26, 2016 at 1:52 AM, Remko Popma <re...@gmail.com> wrote:
>>>>> 
>>>>>> On 2016/07/26, at 1:43, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>> 
>>>>>> The purpose is that the user of Log4j can be sure that the Logger is serializable.
>>>>> 
>>>>> If that is a consideration, the user can select an implementation that is fit for purpose. 
>>>>> 
>>>>> I generally prefer not to make too many guarantees in an interface to give implementations more flexibility. 
>>>>> 
>>>>>>> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>> But to what purpose? Does Log4j itself need this? Is this a case of YAGNI?
>>>>>>> 
>>>>>>> If I have a Logger in an object I serialize, and the class implementing Logger is serializable, then I am good to go.
>>>>>>> 
>>>>>>> Making Logger Serializable, would make this obvious to users and might make some developers warm and fuzzy. It just seems like an odd requirement for ALL implementors of Loggers to be serializable. As a third party Logger implementor, that does not mean it would be done properly. Implementing the interface is no guarantee of proper behavior. 
>>>>>>> 
>>>>>>> Overall, it seems like it would make Log4j less friendly to 3rd party implementors. Are there even any? 
>>>>>>> 
>>>>>>> Gary
>>>>>>> 
>>>>>>>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>> But maybe we actually want to force all implementations to be serializable?
>>>>>>>> 
>>>>>>>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com> wrote:
>>>>>>>>> I think the theory is it is preferable to let implementors of an interface implement java.io.Serializable instead of letting the interface extend java.io.Serializable. That gives future implementors the freedom to choose to either implement Serializable or not.
>>>>>>>>> 
>>>>>>>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>> It seems like serializable logger is useful in Apache Spark, which is popular to use from Scala.
>>>>>>>>>> 
>>>>>>>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>>>>>>>> Do Scala programmers use Serializable a lot, or is there a better mechanism there? Because if there's a more Scala way of doing it, that would make more sense. Otherwise, you can always add Serializable later, but you shouldn't remove it once it's part of the public API.
>>>>>>>>>>> 
>>>>>>>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>> I am asking this since I'm considering making the Scala Logger wrapper Serializable. Would that be a good idea?
>>>>>>>>>>>> 
>>>>>>>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I guess we could also document that fact if we don't want to mark the interface Serializable.
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <ra...@dslextreme.com> wrote:
>>>>>>>>>>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> I don't think we should limit ourselves to what we add to the API just for the sake of alternative implementations.
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>>>>>>>>>>> I do not think you want to _force_ all implementation to be serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>>>>>> But if this is a feature that is useful for some users, why not fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>>>>>>>>>>>>>>> It's Serializable because there was a feature request for it. The jira ticket is internal (reported by Gary), but I recall either another bug or a mailing list post where the justification was so that serializable classes can still use a Logger instance field (not everyone uses a static field for the Logger for some reason).
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com> wrote:
>>>>>>>>>>>>>>>>>>> I asked myself the same question and I guess the answer is that Logger is included in lots of classes, many of which are Serializable. It would be easier for us to make AbstractLogger Serializable then for all the users to mark it as transient and have to manually instantiate the Logger during de-Serialization.
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in log4j-core, Serializable?
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>>> I do not think there is a way to know what folks are doing out there...
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support serialization to each provider.
>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mi...@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is not. Why is it so?
>>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
>>>>>>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>>>>>>> Spring Batch in Action
>>>>>>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com 
>>>>>>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |                      www.magine.com 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>> Spring Batch in Action
>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com 
>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>  
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> -- 
>>>>>>>>>>>>  
>>>>>>>>>>>> 
>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>> 
>>>>>>>>>>>> Magine TV
>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>> 
>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> -- 
>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> -- 
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>>> Mikael Ståldal
>>>>>>>>>> Senior software developer 
>>>>>>>>>> 
>>>>>>>>>> Magine TV
>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>> 
>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> -- 
>>>>>>>>  
>>>>>>>> 
>>>>>>>> Mikael Ståldal
>>>>>>>> Senior software developer 
>>>>>>>> 
>>>>>>>> Magine TV
>>>>>>>> mikael.staldal@magine.com    
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>> 
>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -- 
>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>> JUnit in Action, Second Edition
>>>>>>> Spring Batch in Action
>>>>>>> Blog: http://garygregory.wordpress.com 
>>>>>>> Home: http://garygregory.com/
>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> -- 
>>>>>>  
>>>>>> 
>>>>>> Mikael Ståldal
>>>>>> Senior software developer 
>>>>>> 
>>>>>> Magine TV
>>>>>> mikael.staldal@magine.com    
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>> 
>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>> 
>>>> 
>>>> 
>>>> -- 
>>>>  
>>>> 
>>>> Mikael Ståldal
>>>> Senior software developer 
>>>> 
>>>> Magine TV
>>>> mikael.staldal@magine.com    
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>> 
>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>> you should destroy this message and kindly notify the sender by reply email.   
>> 
>> 
>> 
>> -- 
>>  
>> 
>> Mikael Ståldal
>> Senior software developer 
>> 
>> Magine TV
>> mikael.staldal@magine.com    
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>> 
>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com             
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   

Re: Serializable Logger

Posted by Remko Popma <re...@gmail.com>.
Ah, thank you.

On Tue, Jul 26, 2016 at 10:33 PM, Mikael Ståldal <mi...@magine.com>
wrote:

> The use case is here: https://issues.apache.org/jira/browse/LOG4J2-801
>
> On Tue, Jul 26, 2016 at 2:43 PM, Remko Popma <re...@gmail.com>
> wrote:
>
>> What is the exact use case? Who needs this, and what do they want to
>> accomplish?
>> If Apache Spark needs this we should be able to find out more without
>> having to guess...
>>
>> On Tue, Jul 26, 2016 at 9:36 PM, Mikael Ståldal <
>> mikael.staldal@magine.com> wrote:
>>
>>> And if we cannot fix it, we should remove Serializable from
>>> AbstractLogger.
>>>
>>> On Tue, Jul 26, 2016 at 2:06 PM, Mikael Ståldal <
>>> mikael.staldal@magine.com> wrote:
>>>
>>>> If that's the case, we should reopen
>>>> https://issues.apache.org/jira/browse/LOG4J2-801
>>>>
>>>>
>>>> On Tue, Jul 26, 2016 at 1:47 PM, Remko Popma <re...@gmail.com>
>>>> wrote:
>>>>
>>>>> But realistically it may not be easy to spin up a background thread
>>>>> etc on deserialization.
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>> On 2016/07/26, at 20:08, Mikael Ståldal <mi...@magine.com>
>>>>> wrote:
>>>>>
>>>>> It seems like this should be the case already:
>>>>>
>>>>> https://issues.apache.org/jira/browse/LOG4J2-801
>>>>>
>>>>> What about AsyncLogger though?
>>>>>
>>>>> On Tue, Jul 26, 2016 at 12:07 PM, Mikael Ståldal <
>>>>> mikael.staldal@magine.com> wrote:
>>>>>
>>>>>> That deserialized loggers work (given that all needed dependencies
>>>>>> are on classpath) is a reasonable expectation. If we cannot guarantee
>>>>>> that, then we should not declare that loggers are serializable.
>>>>>>
>>>>>> On Tue, Jul 26, 2016 at 11:45 AM, Remko Popma <re...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Sure. What is the expectation here?
>>>>>>> Do deserialized Loggers work?
>>>>>>>
>>>>>>> Sent from my iPhone
>>>>>>>
>>>>>>> On 2016/07/26, at 17:26, Mikael Ståldal <mi...@magine.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Can we at least document that we guarantee that Loggers from
>>>>>>> log4j-impl are always serializable?
>>>>>>>
>>>>>>> On Tue, Jul 26, 2016 at 1:52 AM, Remko Popma <re...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> On 2016/07/26, at 1:43, Mikael Ståldal <mi...@magine.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> The purpose is that the user of Log4j can be sure that the Logger
>>>>>>>> is serializable.
>>>>>>>>
>>>>>>>>
>>>>>>>> If that is a consideration, the user can select an implementation
>>>>>>>> that is fit for purpose.
>>>>>>>>
>>>>>>>> I generally prefer not to make too many guarantees in an interface
>>>>>>>> to give implementations more flexibility.
>>>>>>>>
>>>>>>>> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <
>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> But to what purpose? Does Log4j itself need this? Is this a case
>>>>>>>>> of YAGNI?
>>>>>>>>>
>>>>>>>>> If I have a Logger in an object I serialize, and the class
>>>>>>>>> implementing Logger is serializable, then I am good to go.
>>>>>>>>>
>>>>>>>>> Making Logger Serializable, would make this obvious to users and
>>>>>>>>> might make some developers warm and fuzzy. It just seems like an odd
>>>>>>>>> requirement for ALL implementors of Loggers to be serializable. As a third
>>>>>>>>> party Logger implementor, that does not mean it would be done properly.
>>>>>>>>> Implementing the interface is no guarantee of proper behavior.
>>>>>>>>>
>>>>>>>>> Overall, it seems like it would make Log4j less friendly to 3rd
>>>>>>>>> party implementors. Are there even any?
>>>>>>>>>
>>>>>>>>> Gary
>>>>>>>>>
>>>>>>>>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <
>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>
>>>>>>>>>> But maybe we actually want to force all implementations to be
>>>>>>>>>> serializable?
>>>>>>>>>>
>>>>>>>>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <
>>>>>>>>>> remko.popma@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> I think the theory is it is preferable to let implementors of an
>>>>>>>>>>> interface implement java.io.Serializable instead of letting the interface
>>>>>>>>>>> extend java.io.Serializable. That gives future implementors the freedom to
>>>>>>>>>>> choose to either implement Serializable or not.
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> It seems like serializable logger is useful in Apache Spark,
>>>>>>>>>>>> which is popular to use from Scala.
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Do Scala programmers use Serializable a lot, or is there a
>>>>>>>>>>>>> better mechanism there? Because if there's a more Scala way of doing it,
>>>>>>>>>>>>> that would make more sense. Otherwise, you can always add Serializable
>>>>>>>>>>>>> later, but you shouldn't remove it once it's part of the public API.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <
>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> I am asking this since I'm considering making the Scala
>>>>>>>>>>>>>> Logger wrapper Serializable. Would that be a good idea?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Users can rely on the fact that loggers are always
>>>>>>>>>>>>>>> Serializable.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I guess we could also document that fact if we don't want to
>>>>>>>>>>>>>>> mark the interface Serializable.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> What advantage is gained by declaring the interface
>>>>>>>>>>>>>>>> Serializable?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I don't think we should limit ourselves to what we add to
>>>>>>>>>>>>>>>> the API just for the sake of alternative implementations.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I do not think you want to _force_ all implementation to
>>>>>>>>>>>>>>>>> be serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> But if this is a feature that is useful for some users,
>>>>>>>>>>>>>>>>>> why not fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <
>>>>>>>>>>>>>>>>>> boards@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> It's Serializable because there was a feature request
>>>>>>>>>>>>>>>>>>> for it. The jira ticket is internal (reported by Gary), but I recall either
>>>>>>>>>>>>>>>>>>> another bug or a mailing list post where the justification was so that
>>>>>>>>>>>>>>>>>>> serializable classes can still use a Logger instance field (not everyone
>>>>>>>>>>>>>>>>>>> uses a static field for the Logger for some reason).
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <
>>>>>>>>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> I asked myself the same question and I guess the answer
>>>>>>>>>>>>>>>>>>>> is that Logger is included in lots of classes, many of which are
>>>>>>>>>>>>>>>>>>>> Serializable. It would be easier for us to make AbstractLogger Serializable
>>>>>>>>>>>>>>>>>>>> then for all the users to mark it as transient and have to manually
>>>>>>>>>>>>>>>>>>>> instantiate the Logger during de-Serialization.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation
>>>>>>>>>>>>>>>>>>>> in log4j-core, Serializable?
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> I do not think there is a way to know what folks are
>>>>>>>>>>>>>>>>>>>>> doing out there...
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger
>>>>>>>>>>>>>>>>>>>>>>>> interface is not. Why is it so?
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such
>>>>>>>>>>>>>>>>>>>>>>>> a person), you may not copy or deliver this message to anyone. In such
>>>>>>>>>>>>>>>>>>>>>>>> case,
>>>>>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify
>>>>>>>>>>>>>>>>>>>>>>>> the sender by reply email.
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>>>>>>>>> Spring Batch in Action
>>>>>>>>>>>>>>>>>>>>> <http://www.manning.com/templier/>
>>>>>>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>
>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>
>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>
>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>>> reply email.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>
>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>> Senior software developer
>>>>>>>>>>
>>>>>>>>>> *Magine TV*
>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>
>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>> reply email.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> [image: MagineTV]
>>>>>>>>
>>>>>>>> *Mikael Ståldal*
>>>>>>>> Senior software developer
>>>>>>>>
>>>>>>>> *Magine TV*
>>>>>>>> mikael.staldal@magine.com
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>
>>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>> reply email.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>> *Mikael Ståldal*
>>>>>> Senior software developer
>>>>>>
>>>>>> *Magine TV*
>>>>>> mikael.staldal@magine.com
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>
>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>> message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>> you should destroy this message and kindly notify the sender by reply
>>>>>> email.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
The use case is here: https://issues.apache.org/jira/browse/LOG4J2-801

On Tue, Jul 26, 2016 at 2:43 PM, Remko Popma <re...@gmail.com> wrote:

> What is the exact use case? Who needs this, and what do they want to
> accomplish?
> If Apache Spark needs this we should be able to find out more without
> having to guess...
>
> On Tue, Jul 26, 2016 at 9:36 PM, Mikael Ståldal <mikael.staldal@magine.com
> > wrote:
>
>> And if we cannot fix it, we should remove Serializable from
>> AbstractLogger.
>>
>> On Tue, Jul 26, 2016 at 2:06 PM, Mikael Ståldal <
>> mikael.staldal@magine.com> wrote:
>>
>>> If that's the case, we should reopen
>>> https://issues.apache.org/jira/browse/LOG4J2-801
>>>
>>>
>>> On Tue, Jul 26, 2016 at 1:47 PM, Remko Popma <re...@gmail.com>
>>> wrote:
>>>
>>>> But realistically it may not be easy to spin up a background thread etc
>>>> on deserialization.
>>>>
>>>> Sent from my iPhone
>>>>
>>>> On 2016/07/26, at 20:08, Mikael Ståldal <mi...@magine.com>
>>>> wrote:
>>>>
>>>> It seems like this should be the case already:
>>>>
>>>> https://issues.apache.org/jira/browse/LOG4J2-801
>>>>
>>>> What about AsyncLogger though?
>>>>
>>>> On Tue, Jul 26, 2016 at 12:07 PM, Mikael Ståldal <
>>>> mikael.staldal@magine.com> wrote:
>>>>
>>>>> That deserialized loggers work (given that all needed dependencies are
>>>>> on classpath) is a reasonable expectation. If we cannot guarantee
>>>>> that, then we should not declare that loggers are serializable.
>>>>>
>>>>> On Tue, Jul 26, 2016 at 11:45 AM, Remko Popma <re...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Sure. What is the expectation here?
>>>>>> Do deserialized Loggers work?
>>>>>>
>>>>>> Sent from my iPhone
>>>>>>
>>>>>> On 2016/07/26, at 17:26, Mikael Ståldal <mi...@magine.com>
>>>>>> wrote:
>>>>>>
>>>>>> Can we at least document that we guarantee that Loggers from
>>>>>> log4j-impl are always serializable?
>>>>>>
>>>>>> On Tue, Jul 26, 2016 at 1:52 AM, Remko Popma <re...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>>
>>>>>>> On 2016/07/26, at 1:43, Mikael Ståldal <mi...@magine.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> The purpose is that the user of Log4j can be sure that the Logger is
>>>>>>> serializable.
>>>>>>>
>>>>>>>
>>>>>>> If that is a consideration, the user can select an implementation
>>>>>>> that is fit for purpose.
>>>>>>>
>>>>>>> I generally prefer not to make too many guarantees in an interface
>>>>>>> to give implementations more flexibility.
>>>>>>>
>>>>>>> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <
>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>
>>>>>>>> But to what purpose? Does Log4j itself need this? Is this a case of
>>>>>>>> YAGNI?
>>>>>>>>
>>>>>>>> If I have a Logger in an object I serialize, and the class
>>>>>>>> implementing Logger is serializable, then I am good to go.
>>>>>>>>
>>>>>>>> Making Logger Serializable, would make this obvious to users and
>>>>>>>> might make some developers warm and fuzzy. It just seems like an odd
>>>>>>>> requirement for ALL implementors of Loggers to be serializable. As a third
>>>>>>>> party Logger implementor, that does not mean it would be done properly.
>>>>>>>> Implementing the interface is no guarantee of proper behavior.
>>>>>>>>
>>>>>>>> Overall, it seems like it would make Log4j less friendly to 3rd
>>>>>>>> party implementors. Are there even any?
>>>>>>>>
>>>>>>>> Gary
>>>>>>>>
>>>>>>>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <
>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>
>>>>>>>>> But maybe we actually want to force all implementations to be
>>>>>>>>> serializable?
>>>>>>>>>
>>>>>>>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <
>>>>>>>>> remko.popma@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> I think the theory is it is preferable to let implementors of an
>>>>>>>>>> interface implement java.io.Serializable instead of letting the interface
>>>>>>>>>> extend java.io.Serializable. That gives future implementors the freedom to
>>>>>>>>>> choose to either implement Serializable or not.
>>>>>>>>>>
>>>>>>>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> It seems like serializable logger is useful in Apache Spark,
>>>>>>>>>>> which is popular to use from Scala.
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Do Scala programmers use Serializable a lot, or is there a
>>>>>>>>>>>> better mechanism there? Because if there's a more Scala way of doing it,
>>>>>>>>>>>> that would make more sense. Otherwise, you can always add Serializable
>>>>>>>>>>>> later, but you shouldn't remove it once it's part of the public API.
>>>>>>>>>>>>
>>>>>>>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <
>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> I am asking this since I'm considering making the Scala Logger
>>>>>>>>>>>>> wrapper Serializable. Would that be a good idea?
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Users can rely on the fact that loggers are always
>>>>>>>>>>>>>> Serializable.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I guess we could also document that fact if we don't want to
>>>>>>>>>>>>>> mark the interface Serializable.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> What advantage is gained by declaring the interface
>>>>>>>>>>>>>>> Serializable?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I don't think we should limit ourselves to what we add to
>>>>>>>>>>>>>>> the API just for the sake of alternative implementations.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I do not think you want to _force_ all implementation to be
>>>>>>>>>>>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> But if this is a feature that is useful for some users,
>>>>>>>>>>>>>>>>> why not fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <
>>>>>>>>>>>>>>>>> boards@gmail.com> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> It's Serializable because there was a feature request for
>>>>>>>>>>>>>>>>>> it. The jira ticket is internal (reported by Gary), but I recall either
>>>>>>>>>>>>>>>>>> another bug or a mailing list post where the justification was so that
>>>>>>>>>>>>>>>>>> serializable classes can still use a Logger instance field (not everyone
>>>>>>>>>>>>>>>>>> uses a static field for the Logger for some reason).
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <
>>>>>>>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> I asked myself the same question and I guess the answer
>>>>>>>>>>>>>>>>>>> is that Logger is included in lots of classes, many of which are
>>>>>>>>>>>>>>>>>>> Serializable. It would be easier for us to make AbstractLogger Serializable
>>>>>>>>>>>>>>>>>>> then for all the users to mark it as transient and have to manually
>>>>>>>>>>>>>>>>>>> instantiate the Logger during de-Serialization.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>>>>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> I do not think there is a way to know what folks are
>>>>>>>>>>>>>>>>>>>> doing out there...
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger
>>>>>>>>>>>>>>>>>>>>>>> interface is not. Why is it so?
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such
>>>>>>>>>>>>>>>>>>>>>>> a person), you may not copy or deliver this message to anyone. In such
>>>>>>>>>>>>>>>>>>>>>>> case,
>>>>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify
>>>>>>>>>>>>>>>>>>>>>>> the sender by reply email.
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>>>>>>>> Spring Batch in Action
>>>>>>>>>>>>>>>>>>>> <http://www.manning.com/templier/>
>>>>>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>
>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>
>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>> Senior software developer
>>>>>>>>>>>
>>>>>>>>>>> *Magine TV*
>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>>
>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>> reply email.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [image: MagineTV]
>>>>>>>>>
>>>>>>>>> *Mikael Ståldal*
>>>>>>>>> Senior software developer
>>>>>>>>>
>>>>>>>>> *Magine TV*
>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>
>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>> reply email.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>> Home: http://garygregory.com/
>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>> *Mikael Ståldal*
>>>>>> Senior software developer
>>>>>>
>>>>>> *Magine TV*
>>>>>> mikael.staldal@magine.com
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>
>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>> message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>> you should destroy this message and kindly notify the sender by reply
>>>>>> email.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>


-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Remko Popma <re...@gmail.com>.
What is the exact use case? Who needs this, and what do they want to
accomplish?
If Apache Spark needs this we should be able to find out more without
having to guess...

On Tue, Jul 26, 2016 at 9:36 PM, Mikael Ståldal <mi...@magine.com>
wrote:

> And if we cannot fix it, we should remove Serializable from AbstractLogger.
>
> On Tue, Jul 26, 2016 at 2:06 PM, Mikael Ståldal <mikael.staldal@magine.com
> > wrote:
>
>> If that's the case, we should reopen
>> https://issues.apache.org/jira/browse/LOG4J2-801
>>
>>
>> On Tue, Jul 26, 2016 at 1:47 PM, Remko Popma <re...@gmail.com>
>> wrote:
>>
>>> But realistically it may not be easy to spin up a background thread etc
>>> on deserialization.
>>>
>>> Sent from my iPhone
>>>
>>> On 2016/07/26, at 20:08, Mikael Ståldal <mi...@magine.com>
>>> wrote:
>>>
>>> It seems like this should be the case already:
>>>
>>> https://issues.apache.org/jira/browse/LOG4J2-801
>>>
>>> What about AsyncLogger though?
>>>
>>> On Tue, Jul 26, 2016 at 12:07 PM, Mikael Ståldal <
>>> mikael.staldal@magine.com> wrote:
>>>
>>>> That deserialized loggers work (given that all needed dependencies are
>>>> on classpath) is a reasonable expectation. If we cannot guarantee
>>>> that, then we should not declare that loggers are serializable.
>>>>
>>>> On Tue, Jul 26, 2016 at 11:45 AM, Remko Popma <re...@gmail.com>
>>>> wrote:
>>>>
>>>>> Sure. What is the expectation here?
>>>>> Do deserialized Loggers work?
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>> On 2016/07/26, at 17:26, Mikael Ståldal <mi...@magine.com>
>>>>> wrote:
>>>>>
>>>>> Can we at least document that we guarantee that Loggers from
>>>>> log4j-impl are always serializable?
>>>>>
>>>>> On Tue, Jul 26, 2016 at 1:52 AM, Remko Popma <re...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> On 2016/07/26, at 1:43, Mikael Ståldal <mi...@magine.com>
>>>>>> wrote:
>>>>>>
>>>>>> The purpose is that the user of Log4j can be sure that the Logger is
>>>>>> serializable.
>>>>>>
>>>>>>
>>>>>> If that is a consideration, the user can select an implementation
>>>>>> that is fit for purpose.
>>>>>>
>>>>>> I generally prefer not to make too many guarantees in an interface to
>>>>>> give implementations more flexibility.
>>>>>>
>>>>>> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <garydgregory@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> But to what purpose? Does Log4j itself need this? Is this a case of
>>>>>>> YAGNI?
>>>>>>>
>>>>>>> If I have a Logger in an object I serialize, and the class
>>>>>>> implementing Logger is serializable, then I am good to go.
>>>>>>>
>>>>>>> Making Logger Serializable, would make this obvious to users and
>>>>>>> might make some developers warm and fuzzy. It just seems like an odd
>>>>>>> requirement for ALL implementors of Loggers to be serializable. As a third
>>>>>>> party Logger implementor, that does not mean it would be done properly.
>>>>>>> Implementing the interface is no guarantee of proper behavior.
>>>>>>>
>>>>>>> Overall, it seems like it would make Log4j less friendly to 3rd
>>>>>>> party implementors. Are there even any?
>>>>>>>
>>>>>>> Gary
>>>>>>>
>>>>>>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <
>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>
>>>>>>>> But maybe we actually want to force all implementations to be
>>>>>>>> serializable?
>>>>>>>>
>>>>>>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <remko.popma@gmail.com
>>>>>>>> > wrote:
>>>>>>>>
>>>>>>>>> I think the theory is it is preferable to let implementors of an
>>>>>>>>> interface implement java.io.Serializable instead of letting the interface
>>>>>>>>> extend java.io.Serializable. That gives future implementors the freedom to
>>>>>>>>> choose to either implement Serializable or not.
>>>>>>>>>
>>>>>>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>
>>>>>>>>>> It seems like serializable logger is useful in Apache Spark,
>>>>>>>>>> which is popular to use from Scala.
>>>>>>>>>>
>>>>>>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Do Scala programmers use Serializable a lot, or is there a
>>>>>>>>>>> better mechanism there? Because if there's a more Scala way of doing it,
>>>>>>>>>>> that would make more sense. Otherwise, you can always add Serializable
>>>>>>>>>>> later, but you shouldn't remove it once it's part of the public API.
>>>>>>>>>>>
>>>>>>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <
>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I am asking this since I'm considering making the Scala Logger
>>>>>>>>>>>> wrapper Serializable. Would that be a good idea?
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Users can rely on the fact that loggers are always
>>>>>>>>>>>>> Serializable.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I guess we could also document that fact if we don't want to
>>>>>>>>>>>>> mark the interface Serializable.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> What advantage is gained by declaring the interface
>>>>>>>>>>>>>> Serializable?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I don't think we should limit ourselves to what we add to the
>>>>>>>>>>>>>> API just for the sake of alternative implementations.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I do not think you want to _force_ all implementation to be
>>>>>>>>>>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> But if this is a feature that is useful for some users, why
>>>>>>>>>>>>>>>> not fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <
>>>>>>>>>>>>>>>> boards@gmail.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> It's Serializable because there was a feature request for
>>>>>>>>>>>>>>>>> it. The jira ticket is internal (reported by Gary), but I recall either
>>>>>>>>>>>>>>>>> another bug or a mailing list post where the justification was so that
>>>>>>>>>>>>>>>>> serializable classes can still use a Logger instance field (not everyone
>>>>>>>>>>>>>>>>> uses a static field for the Logger for some reason).
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <
>>>>>>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> I asked myself the same question and I guess the answer
>>>>>>>>>>>>>>>>>> is that Logger is included in lots of classes, many of which are
>>>>>>>>>>>>>>>>>> Serializable. It would be easier for us to make AbstractLogger Serializable
>>>>>>>>>>>>>>>>>> then for all the users to mark it as transient and have to manually
>>>>>>>>>>>>>>>>>> instantiate the Logger during de-Serialization.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>>>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> I do not think there is a way to know what folks are
>>>>>>>>>>>>>>>>>>> doing out there...
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger
>>>>>>>>>>>>>>>>>>>>>> interface is not. Why is it so?
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>>>>>>> Spring Batch in Action
>>>>>>>>>>>>>>>>>>> <http://www.manning.com/templier/>
>>>>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>
>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>
>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>
>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>
>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>>> reply email.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>
>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>> Senior software developer
>>>>>>>>>>
>>>>>>>>>> *Magine TV*
>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>
>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>> reply email.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> [image: MagineTV]
>>>>>>>>
>>>>>>>> *Mikael Ståldal*
>>>>>>>> Senior software developer
>>>>>>>>
>>>>>>>> *Magine TV*
>>>>>>>> mikael.staldal@magine.com
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>
>>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>> reply email.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>> Home: http://garygregory.com/
>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>> *Mikael Ståldal*
>>>>>> Senior software developer
>>>>>>
>>>>>> *Magine TV*
>>>>>> mikael.staldal@magine.com
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>
>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>> message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>> you should destroy this message and kindly notify the sender by reply
>>>>>> email.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
And if we cannot fix it, we should remove Serializable from AbstractLogger.

On Tue, Jul 26, 2016 at 2:06 PM, Mikael Ståldal <mi...@magine.com>
wrote:

> If that's the case, we should reopen
> https://issues.apache.org/jira/browse/LOG4J2-801
>
>
> On Tue, Jul 26, 2016 at 1:47 PM, Remko Popma <re...@gmail.com>
> wrote:
>
>> But realistically it may not be easy to spin up a background thread etc
>> on deserialization.
>>
>> Sent from my iPhone
>>
>> On 2016/07/26, at 20:08, Mikael Ståldal <mi...@magine.com>
>> wrote:
>>
>> It seems like this should be the case already:
>>
>> https://issues.apache.org/jira/browse/LOG4J2-801
>>
>> What about AsyncLogger though?
>>
>> On Tue, Jul 26, 2016 at 12:07 PM, Mikael Ståldal <
>> mikael.staldal@magine.com> wrote:
>>
>>> That deserialized loggers work (given that all needed dependencies are
>>> on classpath) is a reasonable expectation. If we cannot guarantee that,
>>> then we should not declare that loggers are serializable.
>>>
>>> On Tue, Jul 26, 2016 at 11:45 AM, Remko Popma <re...@gmail.com>
>>> wrote:
>>>
>>>> Sure. What is the expectation here?
>>>> Do deserialized Loggers work?
>>>>
>>>> Sent from my iPhone
>>>>
>>>> On 2016/07/26, at 17:26, Mikael Ståldal <mi...@magine.com>
>>>> wrote:
>>>>
>>>> Can we at least document that we guarantee that Loggers from
>>>> log4j-impl are always serializable?
>>>>
>>>> On Tue, Jul 26, 2016 at 1:52 AM, Remko Popma <re...@gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>> On 2016/07/26, at 1:43, Mikael Ståldal <mi...@magine.com>
>>>>> wrote:
>>>>>
>>>>> The purpose is that the user of Log4j can be sure that the Logger is
>>>>> serializable.
>>>>>
>>>>>
>>>>> If that is a consideration, the user can select an implementation that
>>>>> is fit for purpose.
>>>>>
>>>>> I generally prefer not to make too many guarantees in an interface to
>>>>> give implementations more flexibility.
>>>>>
>>>>> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <ga...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> But to what purpose? Does Log4j itself need this? Is this a case of
>>>>>> YAGNI?
>>>>>>
>>>>>> If I have a Logger in an object I serialize, and the class
>>>>>> implementing Logger is serializable, then I am good to go.
>>>>>>
>>>>>> Making Logger Serializable, would make this obvious to users and
>>>>>> might make some developers warm and fuzzy. It just seems like an odd
>>>>>> requirement for ALL implementors of Loggers to be serializable. As a third
>>>>>> party Logger implementor, that does not mean it would be done properly.
>>>>>> Implementing the interface is no guarantee of proper behavior.
>>>>>>
>>>>>> Overall, it seems like it would make Log4j less friendly to 3rd party
>>>>>> implementors. Are there even any?
>>>>>>
>>>>>> Gary
>>>>>>
>>>>>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <
>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>
>>>>>>> But maybe we actually want to force all implementations to be
>>>>>>> serializable?
>>>>>>>
>>>>>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I think the theory is it is preferable to let implementors of an
>>>>>>>> interface implement java.io.Serializable instead of letting the interface
>>>>>>>> extend java.io.Serializable. That gives future implementors the freedom to
>>>>>>>> choose to either implement Serializable or not.
>>>>>>>>
>>>>>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>
>>>>>>>>> It seems like serializable logger is useful in Apache Spark, which
>>>>>>>>> is popular to use from Scala.
>>>>>>>>>
>>>>>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Do Scala programmers use Serializable a lot, or is there a better
>>>>>>>>>> mechanism there? Because if there's a more Scala way of doing it, that
>>>>>>>>>> would make more sense. Otherwise, you can always add Serializable later,
>>>>>>>>>> but you shouldn't remove it once it's part of the public API.
>>>>>>>>>>
>>>>>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <
>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> I am asking this since I'm considering making the Scala Logger
>>>>>>>>>>> wrapper Serializable. Would that be a good idea?
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Users can rely on the fact that loggers are always
>>>>>>>>>>>> Serializable.
>>>>>>>>>>>>
>>>>>>>>>>>> I guess we could also document that fact if we don't want to
>>>>>>>>>>>> mark the interface Serializable.
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> What advantage is gained by declaring the interface
>>>>>>>>>>>>> Serializable?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> I don't think we should limit ourselves to what we add to the
>>>>>>>>>>>>> API just for the sake of alternative implementations.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> I do not think you want to _force_ all implementation to be
>>>>>>>>>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> But if this is a feature that is useful for some users, why
>>>>>>>>>>>>>>> not fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <
>>>>>>>>>>>>>>> boards@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> It's Serializable because there was a feature request for
>>>>>>>>>>>>>>>> it. The jira ticket is internal (reported by Gary), but I recall either
>>>>>>>>>>>>>>>> another bug or a mailing list post where the justification was so that
>>>>>>>>>>>>>>>> serializable classes can still use a Logger instance field (not everyone
>>>>>>>>>>>>>>>> uses a static field for the Logger for some reason).
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <
>>>>>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I asked myself the same question and I guess the answer is
>>>>>>>>>>>>>>>>> that Logger is included in lots of classes, many of which are Serializable.
>>>>>>>>>>>>>>>>> It would be easier for us to make AbstractLogger Serializable then for all
>>>>>>>>>>>>>>>>> the users to mark it as transient and have to manually instantiate the
>>>>>>>>>>>>>>>>> Logger during de-Serialization.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> I do not think there is a way to know what folks are
>>>>>>>>>>>>>>>>>> doing out there...
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger
>>>>>>>>>>>>>>>>>>>>> interface is not. Why is it so?
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>
>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>
>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>
>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>
>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>>> reply email.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>
>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>> Senior software developer
>>>>>>>>>>>
>>>>>>>>>>> *Magine TV*
>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>>
>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>> reply email.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [image: MagineTV]
>>>>>>>>>
>>>>>>>>> *Mikael Ståldal*
>>>>>>>>> Senior software developer
>>>>>>>>>
>>>>>>>>> *Magine TV*
>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>
>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>> reply email.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>> <http://www.manning.com/bauer3/>
>>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>> Blog: http://garygregory.wordpress.com
>>>>>> Home: http://garygregory.com/
>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
If that's the case, we should reopen
https://issues.apache.org/jira/browse/LOG4J2-801


On Tue, Jul 26, 2016 at 1:47 PM, Remko Popma <re...@gmail.com> wrote:

> But realistically it may not be easy to spin up a background thread etc on
> deserialization.
>
> Sent from my iPhone
>
> On 2016/07/26, at 20:08, Mikael Ståldal <mi...@magine.com> wrote:
>
> It seems like this should be the case already:
>
> https://issues.apache.org/jira/browse/LOG4J2-801
>
> What about AsyncLogger though?
>
> On Tue, Jul 26, 2016 at 12:07 PM, Mikael Ståldal <
> mikael.staldal@magine.com> wrote:
>
>> That deserialized loggers work (given that all needed dependencies are on
>> classpath) is a reasonable expectation. If we cannot guarantee that,
>> then we should not declare that loggers are serializable.
>>
>> On Tue, Jul 26, 2016 at 11:45 AM, Remko Popma <re...@gmail.com>
>> wrote:
>>
>>> Sure. What is the expectation here?
>>> Do deserialized Loggers work?
>>>
>>> Sent from my iPhone
>>>
>>> On 2016/07/26, at 17:26, Mikael Ståldal <mi...@magine.com>
>>> wrote:
>>>
>>> Can we at least document that we guarantee that Loggers from log4j-impl
>>> are always serializable?
>>>
>>> On Tue, Jul 26, 2016 at 1:52 AM, Remko Popma <re...@gmail.com>
>>> wrote:
>>>
>>>>
>>>> On 2016/07/26, at 1:43, Mikael Ståldal <mi...@magine.com>
>>>> wrote:
>>>>
>>>> The purpose is that the user of Log4j can be sure that the Logger is
>>>> serializable.
>>>>
>>>>
>>>> If that is a consideration, the user can select an implementation that
>>>> is fit for purpose.
>>>>
>>>> I generally prefer not to make too many guarantees in an interface to
>>>> give implementations more flexibility.
>>>>
>>>> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <ga...@gmail.com>
>>>> wrote:
>>>>
>>>>> But to what purpose? Does Log4j itself need this? Is this a case of
>>>>> YAGNI?
>>>>>
>>>>> If I have a Logger in an object I serialize, and the class
>>>>> implementing Logger is serializable, then I am good to go.
>>>>>
>>>>> Making Logger Serializable, would make this obvious to users and might
>>>>> make some developers warm and fuzzy. It just seems like an odd requirement
>>>>> for ALL implementors of Loggers to be serializable. As a third party Logger
>>>>> implementor, that does not mean it would be done properly. Implementing the
>>>>> interface is no guarantee of proper behavior.
>>>>>
>>>>> Overall, it seems like it would make Log4j less friendly to 3rd party
>>>>> implementors. Are there even any?
>>>>>
>>>>> Gary
>>>>>
>>>>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <
>>>>> mikael.staldal@magine.com> wrote:
>>>>>
>>>>>> But maybe we actually want to force all implementations to be
>>>>>> serializable?
>>>>>>
>>>>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> I think the theory is it is preferable to let implementors of an
>>>>>>> interface implement java.io.Serializable instead of letting the interface
>>>>>>> extend java.io.Serializable. That gives future implementors the freedom to
>>>>>>> choose to either implement Serializable or not.
>>>>>>>
>>>>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>
>>>>>>>> It seems like serializable logger is useful in Apache Spark, which
>>>>>>>> is popular to use from Scala.
>>>>>>>>
>>>>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Do Scala programmers use Serializable a lot, or is there a better
>>>>>>>>> mechanism there? Because if there's a more Scala way of doing it, that
>>>>>>>>> would make more sense. Otherwise, you can always add Serializable later,
>>>>>>>>> but you shouldn't remove it once it's part of the public API.
>>>>>>>>>
>>>>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <
>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>
>>>>>>>>>> I am asking this since I'm considering making the Scala Logger
>>>>>>>>>> wrapper Serializable. Would that be a good idea?
>>>>>>>>>>
>>>>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>>>>>>>
>>>>>>>>>>> I guess we could also document that fact if we don't want to
>>>>>>>>>>> mark the interface Serializable.
>>>>>>>>>>>
>>>>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> What advantage is gained by declaring the interface
>>>>>>>>>>>> Serializable?
>>>>>>>>>>>>
>>>>>>>>>>>> Ralph
>>>>>>>>>>>>
>>>>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> I don't think we should limit ourselves to what we add to the
>>>>>>>>>>>> API just for the sake of alternative implementations.
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> I do not think you want to _force_ all implementation to be
>>>>>>>>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> But if this is a feature that is useful for some users, why
>>>>>>>>>>>>>> not fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <
>>>>>>>>>>>>>> boards@gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> It's Serializable because there was a feature request for
>>>>>>>>>>>>>>> it. The jira ticket is internal (reported by Gary), but I recall either
>>>>>>>>>>>>>>> another bug or a mailing list post where the justification was so that
>>>>>>>>>>>>>>> serializable classes can still use a Logger instance field (not everyone
>>>>>>>>>>>>>>> uses a static field for the Logger for some reason).
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <
>>>>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I asked myself the same question and I guess the answer is
>>>>>>>>>>>>>>>> that Logger is included in lots of classes, many of which are Serializable.
>>>>>>>>>>>>>>>> It would be easier for us to make AbstractLogger Serializable then for all
>>>>>>>>>>>>>>>> the users to mark it as transient and have to manually instantiate the
>>>>>>>>>>>>>>>> Logger during de-Serialization.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I do not think there is a way to know what folks are doing
>>>>>>>>>>>>>>>>> out there...
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger
>>>>>>>>>>>>>>>>>>>> interface is not. Why is it so?
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>
>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>
>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>
>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>>> reply email.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>
>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>> Senior software developer
>>>>>>>>>>>
>>>>>>>>>>> *Magine TV*
>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>>
>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>> reply email.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>
>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>> Senior software developer
>>>>>>>>>>
>>>>>>>>>> *Magine TV*
>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>
>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>> reply email.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> [image: MagineTV]
>>>>>>>>
>>>>>>>> *Mikael Ståldal*
>>>>>>>> Senior software developer
>>>>>>>>
>>>>>>>> *Magine TV*
>>>>>>>> mikael.staldal@magine.com
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>
>>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>> reply email.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>> *Mikael Ståldal*
>>>>>> Senior software developer
>>>>>>
>>>>>> *Magine TV*
>>>>>> mikael.staldal@magine.com
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>
>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>> message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>> you should destroy this message and kindly notify the sender by reply
>>>>>> email.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>> Java Persistence with Hibernate, Second Edition
>>>>> <http://www.manning.com/bauer3/>
>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>> Blog: http://garygregory.wordpress.com
>>>>> Home: http://garygregory.com/
>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>
>


-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Remko Popma <re...@gmail.com>.
But realistically it may not be easy to spin up a background thread etc on deserialization. 

Sent from my iPhone

> On 2016/07/26, at 20:08, Mikael Ståldal <mi...@magine.com> wrote:
> 
> It seems like this should be the case already:
> 
> https://issues.apache.org/jira/browse/LOG4J2-801
> 
> What about AsyncLogger though?
> 
>> On Tue, Jul 26, 2016 at 12:07 PM, Mikael Ståldal <mi...@magine.com> wrote:
>> That deserialized loggers work (given that all needed dependencies are on classpath) is a reasonable expectation. If we cannot guarantee that, then we should not declare that loggers are serializable.
>> 
>>> On Tue, Jul 26, 2016 at 11:45 AM, Remko Popma <re...@gmail.com> wrote:
>>> Sure. What is the expectation here?
>>> Do deserialized Loggers work?
>>> 
>>> Sent from my iPhone
>>> 
>>>> On 2016/07/26, at 17:26, Mikael Ståldal <mi...@magine.com> wrote:
>>>> 
>>>> Can we at least document that we guarantee that Loggers from log4j-impl are always serializable?
>>>> 
>>>>> On Tue, Jul 26, 2016 at 1:52 AM, Remko Popma <re...@gmail.com> wrote:
>>>>> 
>>>>>> On 2016/07/26, at 1:43, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>> 
>>>>>> The purpose is that the user of Log4j can be sure that the Logger is serializable.
>>>>> 
>>>>> If that is a consideration, the user can select an implementation that is fit for purpose. 
>>>>> 
>>>>> I generally prefer not to make too many guarantees in an interface to give implementations more flexibility. 
>>>>> 
>>>>>>> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>> But to what purpose? Does Log4j itself need this? Is this a case of YAGNI?
>>>>>>> 
>>>>>>> If I have a Logger in an object I serialize, and the class implementing Logger is serializable, then I am good to go.
>>>>>>> 
>>>>>>> Making Logger Serializable, would make this obvious to users and might make some developers warm and fuzzy. It just seems like an odd requirement for ALL implementors of Loggers to be serializable. As a third party Logger implementor, that does not mean it would be done properly. Implementing the interface is no guarantee of proper behavior. 
>>>>>>> 
>>>>>>> Overall, it seems like it would make Log4j less friendly to 3rd party implementors. Are there even any? 
>>>>>>> 
>>>>>>> Gary
>>>>>>> 
>>>>>>>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>> But maybe we actually want to force all implementations to be serializable?
>>>>>>>> 
>>>>>>>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com> wrote:
>>>>>>>>> I think the theory is it is preferable to let implementors of an interface implement java.io.Serializable instead of letting the interface extend java.io.Serializable. That gives future implementors the freedom to choose to either implement Serializable or not.
>>>>>>>>> 
>>>>>>>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>> It seems like serializable logger is useful in Apache Spark, which is popular to use from Scala.
>>>>>>>>>> 
>>>>>>>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>>>>>>>> Do Scala programmers use Serializable a lot, or is there a better mechanism there? Because if there's a more Scala way of doing it, that would make more sense. Otherwise, you can always add Serializable later, but you shouldn't remove it once it's part of the public API.
>>>>>>>>>>> 
>>>>>>>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>> I am asking this since I'm considering making the Scala Logger wrapper Serializable. Would that be a good idea?
>>>>>>>>>>>> 
>>>>>>>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I guess we could also document that fact if we don't want to mark the interface Serializable.
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <ra...@dslextreme.com> wrote:
>>>>>>>>>>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> I don't think we should limit ourselves to what we add to the API just for the sake of alternative implementations.
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>>>>>>>>>>> I do not think you want to _force_ all implementation to be serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>>>>>> But if this is a feature that is useful for some users, why not fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>>>>>>>>>>>>>>> It's Serializable because there was a feature request for it. The jira ticket is internal (reported by Gary), but I recall either another bug or a mailing list post where the justification was so that serializable classes can still use a Logger instance field (not everyone uses a static field for the Logger for some reason).
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com> wrote:
>>>>>>>>>>>>>>>>>>> I asked myself the same question and I guess the answer is that Logger is included in lots of classes, many of which are Serializable. It would be easier for us to make AbstractLogger Serializable then for all the users to mark it as transient and have to manually instantiate the Logger during de-Serialization.
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in log4j-core, Serializable?
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>>> I do not think there is a way to know what folks are doing out there...
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support serialization to each provider.
>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mi...@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is not. Why is it so?
>>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
>>>>>>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>>>>>>> Spring Batch in Action
>>>>>>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com 
>>>>>>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |                      www.magine.com 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>> Spring Batch in Action
>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com 
>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>  
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> -- 
>>>>>>>>>>>>  
>>>>>>>>>>>> 
>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>> 
>>>>>>>>>>>> Magine TV
>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>> 
>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> -- 
>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> -- 
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>>> Mikael Ståldal
>>>>>>>>>> Senior software developer 
>>>>>>>>>> 
>>>>>>>>>> Magine TV
>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>> 
>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> -- 
>>>>>>>>  
>>>>>>>> 
>>>>>>>> Mikael Ståldal
>>>>>>>> Senior software developer 
>>>>>>>> 
>>>>>>>> Magine TV
>>>>>>>> mikael.staldal@magine.com    
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>> 
>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -- 
>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>> JUnit in Action, Second Edition
>>>>>>> Spring Batch in Action
>>>>>>> Blog: http://garygregory.wordpress.com 
>>>>>>> Home: http://garygregory.com/
>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> -- 
>>>>>>  
>>>>>> 
>>>>>> Mikael Ståldal
>>>>>> Senior software developer 
>>>>>> 
>>>>>> Magine TV
>>>>>> mikael.staldal@magine.com    
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>> 
>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>> 
>>>> 
>>>> 
>>>> -- 
>>>>  
>>>> 
>>>> Mikael Ståldal
>>>> Senior software developer 
>>>> 
>>>> Magine TV
>>>> mikael.staldal@magine.com    
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>> 
>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>> you should destroy this message and kindly notify the sender by reply email.   
>> 
>> 
>> 
>> -- 
>>  
>> 
>> Mikael Ståldal
>> Senior software developer 
>> 
>> Magine TV
>> mikael.staldal@magine.com    
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>> 
>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com             
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
It seems like this should be the case already:

https://issues.apache.org/jira/browse/LOG4J2-801

What about AsyncLogger though?

On Tue, Jul 26, 2016 at 12:07 PM, Mikael Ståldal <mi...@magine.com>
wrote:

> That deserialized loggers work (given that all needed dependencies are on
> classpath) is a reasonable expectation. If we cannot guarantee that, then
> we should not declare that loggers are serializable.
>
> On Tue, Jul 26, 2016 at 11:45 AM, Remko Popma <re...@gmail.com>
> wrote:
>
>> Sure. What is the expectation here?
>> Do deserialized Loggers work?
>>
>> Sent from my iPhone
>>
>> On 2016/07/26, at 17:26, Mikael Ståldal <mi...@magine.com>
>> wrote:
>>
>> Can we at least document that we guarantee that Loggers from log4j-impl
>> are always serializable?
>>
>> On Tue, Jul 26, 2016 at 1:52 AM, Remko Popma <re...@gmail.com>
>> wrote:
>>
>>>
>>> On 2016/07/26, at 1:43, Mikael Ståldal <mi...@magine.com>
>>> wrote:
>>>
>>> The purpose is that the user of Log4j can be sure that the Logger is
>>> serializable.
>>>
>>>
>>> If that is a consideration, the user can select an implementation that
>>> is fit for purpose.
>>>
>>> I generally prefer not to make too many guarantees in an interface to
>>> give implementations more flexibility.
>>>
>>> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <ga...@gmail.com>
>>> wrote:
>>>
>>>> But to what purpose? Does Log4j itself need this? Is this a case of
>>>> YAGNI?
>>>>
>>>> If I have a Logger in an object I serialize, and the class implementing
>>>> Logger is serializable, then I am good to go.
>>>>
>>>> Making Logger Serializable, would make this obvious to users and might
>>>> make some developers warm and fuzzy. It just seems like an odd requirement
>>>> for ALL implementors of Loggers to be serializable. As a third party Logger
>>>> implementor, that does not mean it would be done properly. Implementing the
>>>> interface is no guarantee of proper behavior.
>>>>
>>>> Overall, it seems like it would make Log4j less friendly to 3rd party
>>>> implementors. Are there even any?
>>>>
>>>> Gary
>>>>
>>>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <
>>>> mikael.staldal@magine.com> wrote:
>>>>
>>>>> But maybe we actually want to force all implementations to be
>>>>> serializable?
>>>>>
>>>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> I think the theory is it is preferable to let implementors of an
>>>>>> interface implement java.io.Serializable instead of letting the interface
>>>>>> extend java.io.Serializable. That gives future implementors the freedom to
>>>>>> choose to either implement Serializable or not.
>>>>>>
>>>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>
>>>>>>> It seems like serializable logger is useful in Apache Spark, which
>>>>>>> is popular to use from Scala.
>>>>>>>
>>>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Do Scala programmers use Serializable a lot, or is there a better
>>>>>>>> mechanism there? Because if there's a more Scala way of doing it, that
>>>>>>>> would make more sense. Otherwise, you can always add Serializable later,
>>>>>>>> but you shouldn't remove it once it's part of the public API.
>>>>>>>>
>>>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <mikael.staldal@magine.com
>>>>>>>> > wrote:
>>>>>>>>
>>>>>>>>> I am asking this since I'm considering making the Scala Logger
>>>>>>>>> wrapper Serializable. Would that be a good idea?
>>>>>>>>>
>>>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>
>>>>>>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>>>>>>
>>>>>>>>>> I guess we could also document that fact if we don't want to mark
>>>>>>>>>> the interface Serializable.
>>>>>>>>>>
>>>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>>>>>>>
>>>>>>>>>>> Ralph
>>>>>>>>>>>
>>>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>> I don't think we should limit ourselves to what we add to the
>>>>>>>>>>> API just for the sake of alternative implementations.
>>>>>>>>>>>
>>>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I do not think you want to _force_ all implementation to be
>>>>>>>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>>>
>>>>>>>>>>>> Gary
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> But if this is a feature that is useful for some users, why
>>>>>>>>>>>>> not fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <boards@gmail.com
>>>>>>>>>>>>> > wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> It's Serializable because there was a feature request for it.
>>>>>>>>>>>>>> The jira ticket is internal (reported by Gary), but I recall either another
>>>>>>>>>>>>>> bug or a mailing list post where the justification was so that serializable
>>>>>>>>>>>>>> classes can still use a Logger instance field (not everyone uses a static
>>>>>>>>>>>>>> field for the Logger for some reason).
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <
>>>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I asked myself the same question and I guess the answer is
>>>>>>>>>>>>>>> that Logger is included in lots of classes, many of which are Serializable.
>>>>>>>>>>>>>>> It would be easier for us to make AbstractLogger Serializable then for all
>>>>>>>>>>>>>>> the users to mark it as transient and have to manually instantiate the
>>>>>>>>>>>>>>> Logger during de-Serialization.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I do not think there is a way to know what folks are doing
>>>>>>>>>>>>>>>> out there...
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface
>>>>>>>>>>>>>>>>>>> is not. Why is it so?
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>
>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>
>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>> Senior software developer
>>>>>>>>>>>
>>>>>>>>>>> *Magine TV*
>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>>
>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>> reply email.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>
>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>> Senior software developer
>>>>>>>>>>
>>>>>>>>>> *Magine TV*
>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>
>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>> reply email.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [image: MagineTV]
>>>>>>>>>
>>>>>>>>> *Mikael Ståldal*
>>>>>>>>> Senior software developer
>>>>>>>>>
>>>>>>>>> *Magine TV*
>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>
>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>> reply email.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>> Java Persistence with Hibernate, Second Edition
>>>> <http://www.manning.com/bauer3/>
>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>> Blog: http://garygregory.wordpress.com
>>>> Home: http://garygregory.com/
>>>> Tweet! http://twitter.com/GaryGregory
>>>>
>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
That deserialized loggers work (given that all needed dependencies are on
classpath) is a reasonable expectation. If we cannot guarantee that, then
we should not declare that loggers are serializable.

On Tue, Jul 26, 2016 at 11:45 AM, Remko Popma <re...@gmail.com> wrote:

> Sure. What is the expectation here?
> Do deserialized Loggers work?
>
> Sent from my iPhone
>
> On 2016/07/26, at 17:26, Mikael Ståldal <mi...@magine.com> wrote:
>
> Can we at least document that we guarantee that Loggers from log4j-impl
> are always serializable?
>
> On Tue, Jul 26, 2016 at 1:52 AM, Remko Popma <re...@gmail.com>
> wrote:
>
>>
>> On 2016/07/26, at 1:43, Mikael Ståldal <mi...@magine.com> wrote:
>>
>> The purpose is that the user of Log4j can be sure that the Logger is
>> serializable.
>>
>>
>> If that is a consideration, the user can select an implementation that is
>> fit for purpose.
>>
>> I generally prefer not to make too many guarantees in an interface to
>> give implementations more flexibility.
>>
>> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>>
>>> But to what purpose? Does Log4j itself need this? Is this a case of
>>> YAGNI?
>>>
>>> If I have a Logger in an object I serialize, and the class implementing
>>> Logger is serializable, then I am good to go.
>>>
>>> Making Logger Serializable, would make this obvious to users and might
>>> make some developers warm and fuzzy. It just seems like an odd requirement
>>> for ALL implementors of Loggers to be serializable. As a third party Logger
>>> implementor, that does not mean it would be done properly. Implementing the
>>> interface is no guarantee of proper behavior.
>>>
>>> Overall, it seems like it would make Log4j less friendly to 3rd party
>>> implementors. Are there even any?
>>>
>>> Gary
>>>
>>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <
>>> mikael.staldal@magine.com> wrote:
>>>
>>>> But maybe we actually want to force all implementations to be
>>>> serializable?
>>>>
>>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com>
>>>> wrote:
>>>>
>>>>> I think the theory is it is preferable to let implementors of an
>>>>> interface implement java.io.Serializable instead of letting the interface
>>>>> extend java.io.Serializable. That gives future implementors the freedom to
>>>>> choose to either implement Serializable or not.
>>>>>
>>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
>>>>> mikael.staldal@magine.com> wrote:
>>>>>
>>>>>> It seems like serializable logger is useful in Apache Spark, which is
>>>>>> popular to use from Scala.
>>>>>>
>>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Do Scala programmers use Serializable a lot, or is there a better
>>>>>>> mechanism there? Because if there's a more Scala way of doing it, that
>>>>>>> would make more sense. Otherwise, you can always add Serializable later,
>>>>>>> but you shouldn't remove it once it's part of the public API.
>>>>>>>
>>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I am asking this since I'm considering making the Scala Logger
>>>>>>>> wrapper Serializable. Would that be a good idea?
>>>>>>>>
>>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>
>>>>>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>>>>>
>>>>>>>>> I guess we could also document that fact if we don't want to mark
>>>>>>>>> the interface Serializable.
>>>>>>>>>
>>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>
>>>>>>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>>>>>>
>>>>>>>>>> Ralph
>>>>>>>>>>
>>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>
>>>>>>>>>> I don't think we should limit ourselves to what we add to the API
>>>>>>>>>> just for the sake of alternative implementations.
>>>>>>>>>>
>>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> I do not think you want to _force_ all implementation to be
>>>>>>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>>
>>>>>>>>>>> Gary
>>>>>>>>>>>
>>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> But if this is a feature that is useful for some users, why not
>>>>>>>>>>>> fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> It's Serializable because there was a feature request for it.
>>>>>>>>>>>>> The jira ticket is internal (reported by Gary), but I recall either another
>>>>>>>>>>>>> bug or a mailing list post where the justification was so that serializable
>>>>>>>>>>>>> classes can still use a Logger instance field (not everyone uses a static
>>>>>>>>>>>>> field for the Logger for some reason).
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <
>>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> I asked myself the same question and I guess the answer is
>>>>>>>>>>>>>> that Logger is included in lots of classes, many of which are Serializable.
>>>>>>>>>>>>>> It would be easier for us to make AbstractLogger Serializable then for all
>>>>>>>>>>>>>> the users to mark it as transient and have to manually instantiate the
>>>>>>>>>>>>>> Logger during de-Serialization.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I do not think there is a way to know what folks are doing
>>>>>>>>>>>>>>> out there...
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface
>>>>>>>>>>>>>>>>>> is not. Why is it so?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>
>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>
>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>
>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>>> reply email.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>
>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>> Senior software developer
>>>>>>>>>>
>>>>>>>>>> *Magine TV*
>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>
>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>> reply email.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [image: MagineTV]
>>>>>>>>>
>>>>>>>>> *Mikael Ståldal*
>>>>>>>>> Senior software developer
>>>>>>>>>
>>>>>>>>> *Magine TV*
>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>
>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>> reply email.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> [image: MagineTV]
>>>>>>>>
>>>>>>>> *Mikael Ståldal*
>>>>>>>> Senior software developer
>>>>>>>>
>>>>>>>> *Magine TV*
>>>>>>>> mikael.staldal@magine.com
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>
>>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>> reply email.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>> *Mikael Ståldal*
>>>>>> Senior software developer
>>>>>>
>>>>>> *Magine TV*
>>>>>> mikael.staldal@magine.com
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>
>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>> message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>> you should destroy this message and kindly notify the sender by reply
>>>>>> email.
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>
>>>
>>>
>>> --
>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>> Java Persistence with Hibernate, Second Edition
>>> <http://www.manning.com/bauer3/>
>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>> Spring Batch in Action <http://www.manning.com/templier/>
>>> Blog: http://garygregory.wordpress.com
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory
>>>
>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>
>


-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Remko Popma <re...@gmail.com>.
Sure. What is the expectation here?
Do deserialized Loggers work?

Sent from my iPhone

> On 2016/07/26, at 17:26, Mikael Ståldal <mi...@magine.com> wrote:
> 
> Can we at least document that we guarantee that Loggers from log4j-impl are always serializable?
> 
>> On Tue, Jul 26, 2016 at 1:52 AM, Remko Popma <re...@gmail.com> wrote:
>> 
>>> On 2016/07/26, at 1:43, Mikael Ståldal <mi...@magine.com> wrote:
>>> 
>>> The purpose is that the user of Log4j can be sure that the Logger is serializable.
>> 
>> If that is a consideration, the user can select an implementation that is fit for purpose. 
>> 
>> I generally prefer not to make too many guarantees in an interface to give implementations more flexibility. 
>> 
>>>> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>> But to what purpose? Does Log4j itself need this? Is this a case of YAGNI?
>>>> 
>>>> If I have a Logger in an object I serialize, and the class implementing Logger is serializable, then I am good to go.
>>>> 
>>>> Making Logger Serializable, would make this obvious to users and might make some developers warm and fuzzy. It just seems like an odd requirement for ALL implementors of Loggers to be serializable. As a third party Logger implementor, that does not mean it would be done properly. Implementing the interface is no guarantee of proper behavior. 
>>>> 
>>>> Overall, it seems like it would make Log4j less friendly to 3rd party implementors. Are there even any? 
>>>> 
>>>> Gary
>>>> 
>>>>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>> But maybe we actually want to force all implementations to be serializable?
>>>>> 
>>>>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com> wrote:
>>>>>> I think the theory is it is preferable to let implementors of an interface implement java.io.Serializable instead of letting the interface extend java.io.Serializable. That gives future implementors the freedom to choose to either implement Serializable or not.
>>>>>> 
>>>>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>> It seems like serializable logger is useful in Apache Spark, which is popular to use from Scala.
>>>>>>> 
>>>>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>>>>> Do Scala programmers use Serializable a lot, or is there a better mechanism there? Because if there's a more Scala way of doing it, that would make more sense. Otherwise, you can always add Serializable later, but you shouldn't remove it once it's part of the public API.
>>>>>>>> 
>>>>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>> I am asking this since I'm considering making the Scala Logger wrapper Serializable. Would that be a good idea?
>>>>>>>>> 
>>>>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>>>>>> 
>>>>>>>>>> I guess we could also document that fact if we don't want to mark the interface Serializable.
>>>>>>>>>> 
>>>>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <ra...@dslextreme.com> wrote:
>>>>>>>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>>>>>>> 
>>>>>>>>>>> Ralph
>>>>>>>>>>> 
>>>>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>> I don't think we should limit ourselves to what we add to the API just for the sake of alternative implementations.
>>>>>>>>>>>> 
>>>>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>>>>>>>> I do not think you want to _force_ all implementation to be serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Gary
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>>> But if this is a feature that is useful for some users, why not fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>>>>>>>>>>>> It's Serializable because there was a feature request for it. The jira ticket is internal (reported by Gary), but I recall either another bug or a mailing list post where the justification was so that serializable classes can still use a Logger instance field (not everyone uses a static field for the Logger for some reason).
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com> wrote:
>>>>>>>>>>>>>>>> I asked myself the same question and I guess the answer is that Logger is included in lots of classes, many of which are Serializable. It would be easier for us to make AbstractLogger Serializable then for all the users to mark it as transient and have to manually instantiate the Logger during de-Serialization.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in log4j-core, Serializable?
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>>>>>>>>>>>>> I do not think there is a way to know what folks are doing out there...
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support serialization to each provider.
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mi...@magine.com> wrote:
>>>>>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is not. Why is it so?
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
>>>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>>>> Spring Batch in Action
>>>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com 
>>>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |                      www.magine.com 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>  
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> -- 
>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>> Spring Batch in Action
>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com 
>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> -- 
>>>>>>>>>>>>  
>>>>>>>>>>>> 
>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>> 
>>>>>>>>>>>> Magine TV
>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>> 
>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> -- 
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>>> Mikael Ståldal
>>>>>>>>>> Senior software developer 
>>>>>>>>>> 
>>>>>>>>>> Magine TV
>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>> 
>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> -- 
>>>>>>>>>  
>>>>>>>>> 
>>>>>>>>> Mikael Ståldal
>>>>>>>>> Senior software developer 
>>>>>>>>> 
>>>>>>>>> Magine TV
>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>> 
>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> -- 
>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -- 
>>>>>>>  
>>>>>>> 
>>>>>>> Mikael Ståldal
>>>>>>> Senior software developer 
>>>>>>> 
>>>>>>> Magine TV
>>>>>>> mikael.staldal@magine.com    
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>> 
>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>> 
>>>>> 
>>>>> 
>>>>> -- 
>>>>>  
>>>>> 
>>>>> Mikael Ståldal
>>>>> Senior software developer 
>>>>> 
>>>>> Magine TV
>>>>> mikael.staldal@magine.com    
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>> 
>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may  not copy or deliver this message to anyone. In such case, 
>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>> 
>>>> 
>>>> 
>>>> -- 
>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
>>>> Java Persistence with Hibernate, Second Edition
>>>> JUnit in Action, Second Edition
>>>> Spring Batch in Action
>>>> Blog: http://garygregory.wordpress.com 
>>>> Home: http://garygregory.com/
>>>> Tweet! http://twitter.com/GaryGregory
>>> 
>>> 
>>> 
>>> -- 
>>>  
>>> 
>>> Mikael Ståldal
>>> Senior software developer 
>>> 
>>> Magine TV
>>> mikael.staldal@magine.com    
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>> 
>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com             
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
Can we at least document that we guarantee that Loggers from log4j-impl are
always serializable?

On Tue, Jul 26, 2016 at 1:52 AM, Remko Popma <re...@gmail.com> wrote:

>
> On 2016/07/26, at 1:43, Mikael Ståldal <mi...@magine.com> wrote:
>
> The purpose is that the user of Log4j can be sure that the Logger is
> serializable.
>
>
> If that is a consideration, the user can select an implementation that is
> fit for purpose.
>
> I generally prefer not to make too many guarantees in an interface to give
> implementations more flexibility.
>
> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <ga...@gmail.com>
> wrote:
>
>> But to what purpose? Does Log4j itself need this? Is this a case of YAGNI?
>>
>> If I have a Logger in an object I serialize, and the class implementing
>> Logger is serializable, then I am good to go.
>>
>> Making Logger Serializable, would make this obvious to users and might
>> make some developers warm and fuzzy. It just seems like an odd requirement
>> for ALL implementors of Loggers to be serializable. As a third party Logger
>> implementor, that does not mean it would be done properly. Implementing the
>> interface is no guarantee of proper behavior.
>>
>> Overall, it seems like it would make Log4j less friendly to 3rd party
>> implementors. Are there even any?
>>
>> Gary
>>
>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <
>> mikael.staldal@magine.com> wrote:
>>
>>> But maybe we actually want to force all implementations to be
>>> serializable?
>>>
>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com>
>>> wrote:
>>>
>>>> I think the theory is it is preferable to let implementors of an
>>>> interface implement java.io.Serializable instead of letting the interface
>>>> extend java.io.Serializable. That gives future implementors the freedom to
>>>> choose to either implement Serializable or not.
>>>>
>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
>>>> mikael.staldal@magine.com> wrote:
>>>>
>>>>> It seems like serializable logger is useful in Apache Spark, which is
>>>>> popular to use from Scala.
>>>>>
>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>>
>>>>>> Do Scala programmers use Serializable a lot, or is there a better
>>>>>> mechanism there? Because if there's a more Scala way of doing it, that
>>>>>> would make more sense. Otherwise, you can always add Serializable later,
>>>>>> but you shouldn't remove it once it's part of the public API.
>>>>>>
>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com>
>>>>>> wrote:
>>>>>>
>>>>>>> I am asking this since I'm considering making the Scala Logger
>>>>>>> wrapper Serializable. Would that be a good idea?
>>>>>>>
>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>
>>>>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>>>>
>>>>>>>> I guess we could also document that fact if we don't want to mark
>>>>>>>> the interface Serializable.
>>>>>>>>
>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>
>>>>>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>>>>>
>>>>>>>>> Ralph
>>>>>>>>>
>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>
>>>>>>>>> I don't think we should limit ourselves to what we add to the API
>>>>>>>>> just for the sake of alternative implementations.
>>>>>>>>>
>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> I do not think you want to _force_ all implementation to be
>>>>>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>
>>>>>>>>>> Gary
>>>>>>>>>>
>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> But if this is a feature that is useful for some users, why not
>>>>>>>>>>> fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> It's Serializable because there was a feature request for it.
>>>>>>>>>>>> The jira ticket is internal (reported by Gary), but I recall either another
>>>>>>>>>>>> bug or a mailing list post where the justification was so that serializable
>>>>>>>>>>>> classes can still use a Logger instance field (not everyone uses a static
>>>>>>>>>>>> field for the Logger for some reason).
>>>>>>>>>>>>
>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <
>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> I asked myself the same question and I guess the answer is
>>>>>>>>>>>>> that Logger is included in lots of classes, many of which are Serializable.
>>>>>>>>>>>>> It would be easier for us to make AbstractLogger Serializable then for all
>>>>>>>>>>>>> the users to mark it as transient and have to manually instantiate the
>>>>>>>>>>>>> Logger during de-Serialization.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> I do not think there is a way to know what folks are doing
>>>>>>>>>>>>>> out there...
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface
>>>>>>>>>>>>>>>>> is not. Why is it so?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>
>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>
>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>> Senior software developer
>>>>>>>>>>>
>>>>>>>>>>> *Magine TV*
>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>>
>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>> reply email.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [image: MagineTV]
>>>>>>>>>
>>>>>>>>> *Mikael Ståldal*
>>>>>>>>> Senior software developer
>>>>>>>>>
>>>>>>>>> *Magine TV*
>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>
>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>> reply email.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> [image: MagineTV]
>>>>>>>>
>>>>>>>> *Mikael Ståldal*
>>>>>>>> Senior software developer
>>>>>>>>
>>>>>>>> *Magine TV*
>>>>>>>> mikael.staldal@magine.com
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>
>>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>> reply email.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition
>> <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>
>


-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
Apache Spark needs serializable loggers, and if we can guarantee that Log4j
2 is then that would be a good argument to convince Spark users to use
Log4j 2.

http://stackoverflow.com/questions/29208844/apache-spark-logging-within-scala

On Tue, Jul 26, 2016 at 1:52 AM, Remko Popma <re...@gmail.com> wrote:

>
> On 2016/07/26, at 1:43, Mikael Ståldal <mi...@magine.com> wrote:
>
> The purpose is that the user of Log4j can be sure that the Logger is
> serializable.
>
>
> If that is a consideration, the user can select an implementation that is
> fit for purpose.
>
> I generally prefer not to make too many guarantees in an interface to give
> implementations more flexibility.
>
> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <ga...@gmail.com>
> wrote:
>
>> But to what purpose? Does Log4j itself need this? Is this a case of YAGNI?
>>
>> If I have a Logger in an object I serialize, and the class implementing
>> Logger is serializable, then I am good to go.
>>
>> Making Logger Serializable, would make this obvious to users and might
>> make some developers warm and fuzzy. It just seems like an odd requirement
>> for ALL implementors of Loggers to be serializable. As a third party Logger
>> implementor, that does not mean it would be done properly. Implementing the
>> interface is no guarantee of proper behavior.
>>
>> Overall, it seems like it would make Log4j less friendly to 3rd party
>> implementors. Are there even any?
>>
>> Gary
>>
>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <
>> mikael.staldal@magine.com> wrote:
>>
>>> But maybe we actually want to force all implementations to be
>>> serializable?
>>>
>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com>
>>> wrote:
>>>
>>>> I think the theory is it is preferable to let implementors of an
>>>> interface implement java.io.Serializable instead of letting the interface
>>>> extend java.io.Serializable. That gives future implementors the freedom to
>>>> choose to either implement Serializable or not.
>>>>
>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
>>>> mikael.staldal@magine.com> wrote:
>>>>
>>>>> It seems like serializable logger is useful in Apache Spark, which is
>>>>> popular to use from Scala.
>>>>>
>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>>
>>>>>> Do Scala programmers use Serializable a lot, or is there a better
>>>>>> mechanism there? Because if there's a more Scala way of doing it, that
>>>>>> would make more sense. Otherwise, you can always add Serializable later,
>>>>>> but you shouldn't remove it once it's part of the public API.
>>>>>>
>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com>
>>>>>> wrote:
>>>>>>
>>>>>>> I am asking this since I'm considering making the Scala Logger
>>>>>>> wrapper Serializable. Would that be a good idea?
>>>>>>>
>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>
>>>>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>>>>
>>>>>>>> I guess we could also document that fact if we don't want to mark
>>>>>>>> the interface Serializable.
>>>>>>>>
>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>
>>>>>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>>>>>
>>>>>>>>> Ralph
>>>>>>>>>
>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>
>>>>>>>>> I don't think we should limit ourselves to what we add to the API
>>>>>>>>> just for the sake of alternative implementations.
>>>>>>>>>
>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> I do not think you want to _force_ all implementation to be
>>>>>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>
>>>>>>>>>> Gary
>>>>>>>>>>
>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> But if this is a feature that is useful for some users, why not
>>>>>>>>>>> fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> It's Serializable because there was a feature request for it.
>>>>>>>>>>>> The jira ticket is internal (reported by Gary), but I recall either another
>>>>>>>>>>>> bug or a mailing list post where the justification was so that serializable
>>>>>>>>>>>> classes can still use a Logger instance field (not everyone uses a static
>>>>>>>>>>>> field for the Logger for some reason).
>>>>>>>>>>>>
>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <
>>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> I asked myself the same question and I guess the answer is
>>>>>>>>>>>>> that Logger is included in lots of classes, many of which are Serializable.
>>>>>>>>>>>>> It would be easier for us to make AbstractLogger Serializable then for all
>>>>>>>>>>>>> the users to mark it as transient and have to manually instantiate the
>>>>>>>>>>>>> Logger during de-Serialization.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> I do not think there is a way to know what folks are doing
>>>>>>>>>>>>>> out there...
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface
>>>>>>>>>>>>>>>>> is not. Why is it so?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be
>>>>>>>>>>>>>>>>> contained in this message. If you are not the addressee indicated in this
>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>
>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>
>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>> Senior software developer
>>>>>>>>>>>
>>>>>>>>>>> *Magine TV*
>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>>
>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>> reply email.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [image: MagineTV]
>>>>>>>>>
>>>>>>>>> *Mikael Ståldal*
>>>>>>>>> Senior software developer
>>>>>>>>>
>>>>>>>>> *Magine TV*
>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>
>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>> reply email.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> [image: MagineTV]
>>>>>>>>
>>>>>>>> *Mikael Ståldal*
>>>>>>>> Senior software developer
>>>>>>>>
>>>>>>>> *Magine TV*
>>>>>>>> mikael.staldal@magine.com
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>
>>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>> reply email.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition
>> <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>
>


-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Remko Popma <re...@gmail.com>.
> On 2016/07/26, at 1:43, Mikael Ståldal <mi...@magine.com> wrote:
> 
> The purpose is that the user of Log4j can be sure that the Logger is serializable.

If that is a consideration, the user can select an implementation that is fit for purpose. 

I generally prefer not to make too many guarantees in an interface to give implementations more flexibility. 

>> On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <ga...@gmail.com> wrote:
>> But to what purpose? Does Log4j itself need this? Is this a case of YAGNI?
>> 
>> If I have a Logger in an object I serialize, and the class implementing Logger is serializable, then I am good to go.
>> 
>> Making Logger Serializable, would make this obvious to users and might make some developers warm and fuzzy. It just seems like an odd requirement for ALL implementors of Loggers to be serializable. As a third party Logger implementor, that does not mean it would be done properly. Implementing the interface is no guarantee of proper behavior. 
>> 
>> Overall, it seems like it would make Log4j less friendly to 3rd party implementors. Are there even any? 
>> 
>> Gary
>> 
>>> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>> But maybe we actually want to force all implementations to be serializable?
>>> 
>>>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com> wrote:
>>>> I think the theory is it is preferable to let implementors of an interface implement java.io.Serializable instead of letting the interface extend java.io.Serializable. That gives future implementors the freedom to choose to either implement Serializable or not.
>>>> 
>>>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>> It seems like serializable logger is useful in Apache Spark, which is popular to use from Scala.
>>>>> 
>>>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>>> Do Scala programmers use Serializable a lot, or is there a better mechanism there? Because if there's a more Scala way of doing it, that would make more sense. Otherwise, you can always add Serializable later, but you shouldn't remove it once it's part of the public API.
>>>>>> 
>>>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>> I am asking this since I'm considering making the Scala Logger wrapper Serializable. Would that be a good idea?
>>>>>>> 
>>>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>>>> 
>>>>>>>> I guess we could also document that fact if we don't want to mark the interface Serializable.
>>>>>>>> 
>>>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <ra...@dslextreme.com> wrote:
>>>>>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>>>>> 
>>>>>>>>> Ralph
>>>>>>>>> 
>>>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>> 
>>>>>>>>>> I don't think we should limit ourselves to what we add to the API just for the sake of alternative implementations.
>>>>>>>>>> 
>>>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>>>>>> I do not think you want to _force_ all implementation to be serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>>> 
>>>>>>>>>>> Gary
>>>>>>>>>>> 
>>>>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>> But if this is a feature that is useful for some users, why not fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>>> 
>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>>>>>>>>>> It's Serializable because there was a feature request for it. The jira ticket is internal (reported by Gary), but I recall either another bug or a mailing list post where the justification was so that serializable classes can still use a Logger instance field (not everyone uses a static field for the Logger for some reason).
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com> wrote:
>>>>>>>>>>>>>> I asked myself the same question and I guess the answer is that Logger is included in lots of classes, many of which are Serializable. It would be easier for us to make AbstractLogger Serializable then for all the users to mark it as transient and have to manually instantiate the Logger during de-Serialization.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in log4j-core, Serializable?
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>>>>>>>>>>> I do not think there is a way to know what folks are doing out there...
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <mi...@magine.com> wrote:
>>>>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com> wrote:
>>>>>>>>>>>>>>>>>> Probably to leave the decision on whether to support serialization to each provider.
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mi...@magine.com> wrote:
>>>>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is not. Why is it so?
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |                      www.magine.com 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
>>>>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>>>>> Spring Batch in Action
>>>>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com 
>>>>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Magine TV
>>>>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> -- 
>>>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> -- 
>>>>>>>>>>>>  
>>>>>>>>>>>> 
>>>>>>>>>>>> Mikael Ståldal
>>>>>>>>>>>> Senior software developer 
>>>>>>>>>>>> 
>>>>>>>>>>>> Magine TV
>>>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>>>> 
>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> -- 
>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>> Spring Batch in Action
>>>>>>>>>>> Blog: http://garygregory.wordpress.com 
>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> -- 
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>>> Mikael Ståldal
>>>>>>>>>> Senior software developer 
>>>>>>>>>> 
>>>>>>>>>> Magine TV
>>>>>>>>>> mikael.staldal@magine.com    
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>>>> 
>>>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> -- 
>>>>>>>>  
>>>>>>>> 
>>>>>>>> Mikael Ståldal
>>>>>>>> Senior software developer 
>>>>>>>> 
>>>>>>>> Magine TV
>>>>>>>> mikael.staldal@magine.com    
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>>> 
>>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -- 
>>>>>>>  
>>>>>>> 
>>>>>>> Mikael Ståldal
>>>>>>> Senior software developer 
>>>>>>> 
>>>>>>> Magine TV
>>>>>>> mikael.staldal@magine.com    
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>>>> 
>>>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> -- 
>>>>>> Matt Sicker <bo...@gmail.com>
>>>>> 
>>>>> 
>>>>> 
>>>>> -- 
>>>>>  
>>>>> 
>>>>> Mikael Ståldal
>>>>> Senior software developer 
>>>>> 
>>>>> Magine TV
>>>>> mikael.staldal@magine.com    
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>>>> 
>>>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may  not copy or deliver this message to anyone. In such case, 
>>>>> you should destroy this message and kindly notify the sender by reply email.   
>>> 
>>> 
>>> 
>>> -- 
>>>  
>>> 
>>> Mikael Ståldal
>>> Senior software developer 
>>> 
>>> Magine TV
>>> mikael.staldal@magine.com    
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com 
>>> 
>>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>>> you should destroy this message and kindly notify the sender by reply email.   
>> 
>> 
>> 
>> -- 
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
>> Java Persistence with Hibernate, Second Edition
>> JUnit in Action, Second Edition
>> Spring Batch in Action
>> Blog: http://garygregory.wordpress.com 
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com             
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
The purpose is that the user of Log4j can be sure that the Logger is
serializable.

On Mon, Jul 25, 2016 at 6:38 PM, Gary Gregory <ga...@gmail.com>
wrote:

> But to what purpose? Does Log4j itself need this? Is this a case of YAGNI?
>
> If I have a Logger in an object I serialize, and the class implementing
> Logger is serializable, then I am good to go.
>
> Making Logger Serializable, would make this obvious to users and might
> make some developers warm and fuzzy. It just seems like an odd requirement
> for ALL implementors of Loggers to be serializable. As a third party Logger
> implementor, that does not mean it would be done properly. Implementing the
> interface is no guarantee of proper behavior.
>
> Overall, it seems like it would make Log4j less friendly to 3rd party
> implementors. Are there even any?
>
> Gary
>
> On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <mikael.staldal@magine.com
> > wrote:
>
>> But maybe we actually want to force all implementations to be
>> serializable?
>>
>> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com>
>> wrote:
>>
>>> I think the theory is it is preferable to let implementors of an
>>> interface implement java.io.Serializable instead of letting the interface
>>> extend java.io.Serializable. That gives future implementors the freedom to
>>> choose to either implement Serializable or not.
>>>
>>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
>>> mikael.staldal@magine.com> wrote:
>>>
>>>> It seems like serializable logger is useful in Apache Spark, which is
>>>> popular to use from Scala.
>>>>
>>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>
>>>>> Do Scala programmers use Serializable a lot, or is there a better
>>>>> mechanism there? Because if there's a more Scala way of doing it, that
>>>>> would make more sense. Otherwise, you can always add Serializable later,
>>>>> but you shouldn't remove it once it's part of the public API.
>>>>>
>>>>> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com>
>>>>> wrote:
>>>>>
>>>>>> I am asking this since I'm considering making the Scala Logger
>>>>>> wrapper Serializable. Would that be a good idea?
>>>>>>
>>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>
>>>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>>>
>>>>>>> I guess we could also document that fact if we don't want to mark
>>>>>>> the interface Serializable.
>>>>>>>
>>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>
>>>>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>>>>
>>>>>>>> Ralph
>>>>>>>>
>>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>
>>>>>>>> I don't think we should limit ourselves to what we add to the API
>>>>>>>> just for the sake of alternative implementations.
>>>>>>>>
>>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> I do not think you want to _force_ all implementation to be
>>>>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>>
>>>>>>>>> Gary
>>>>>>>>>
>>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>
>>>>>>>>>> But if this is a feature that is useful for some users, why not
>>>>>>>>>> fully advertise it by making the Logger interface Serializable?
>>>>>>>>>>
>>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> It's Serializable because there was a feature request for it.
>>>>>>>>>>> The jira ticket is internal (reported by Gary), but I recall either another
>>>>>>>>>>> bug or a mailing list post where the justification was so that serializable
>>>>>>>>>>> classes can still use a Logger instance field (not everyone uses a static
>>>>>>>>>>> field for the Logger for some reason).
>>>>>>>>>>>
>>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <
>>>>>>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I asked myself the same question and I guess the answer is that
>>>>>>>>>>>> Logger is included in lots of classes, many of which are Serializable. It
>>>>>>>>>>>> would be easier for us to make AbstractLogger Serializable then for all the
>>>>>>>>>>>> users to mark it as transient and have to manually instantiate the Logger
>>>>>>>>>>>> during de-Serialization.
>>>>>>>>>>>>
>>>>>>>>>>>> Ralph
>>>>>>>>>>>>
>>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> I do not think there is a way to know what folks are doing out
>>>>>>>>>>>>> there...
>>>>>>>>>>>>>
>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is
>>>>>>>>>>>>>>>> not. Why is it so?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>>> you should destroy this message and kindly notify the
>>>>>>>>>>>>>>>> sender by reply email.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>
>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>
>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>
>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>>> reply email.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>
>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>> Senior software developer
>>>>>>>>>>
>>>>>>>>>> *Magine TV*
>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>
>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>> reply email.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> [image: MagineTV]
>>>>>>>>
>>>>>>>> *Mikael Ståldal*
>>>>>>>> Senior software developer
>>>>>>>>
>>>>>>>> *Magine TV*
>>>>>>>> mikael.staldal@magine.com
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>
>>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>> reply email.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>> *Mikael Ståldal*
>>>>>> Senior software developer
>>>>>>
>>>>>> *Magine TV*
>>>>>> mikael.staldal@magine.com
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>
>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>> message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>> you should destroy this message and kindly notify the sender by reply
>>>>>> email.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Matt Sicker <bo...@gmail.com>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>
>>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Gary Gregory <ga...@gmail.com>.
But to what purpose? Does Log4j itself need this? Is this a case of YAGNI?

If I have a Logger in an object I serialize, and the class implementing
Logger is serializable, then I am good to go.

Making Logger Serializable, would make this obvious to users and might make
some developers warm and fuzzy. It just seems like an odd requirement for
ALL implementors of Loggers to be serializable. As a third party Logger
implementor, that does not mean it would be done properly. Implementing the
interface is no guarantee of proper behavior.

Overall, it seems like it would make Log4j less friendly to 3rd party
implementors. Are there even any?

Gary

On Mon, Jul 25, 2016 at 9:07 AM, Mikael Ståldal <mi...@magine.com>
wrote:

> But maybe we actually want to force all implementations to be serializable?
>
> On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com>
> wrote:
>
>> I think the theory is it is preferable to let implementors of an
>> interface implement java.io.Serializable instead of letting the interface
>> extend java.io.Serializable. That gives future implementors the freedom to
>> choose to either implement Serializable or not.
>>
>> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
>> mikael.staldal@magine.com> wrote:
>>
>>> It seems like serializable logger is useful in Apache Spark, which is
>>> popular to use from Scala.
>>>
>>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>
>>>> Do Scala programmers use Serializable a lot, or is there a better
>>>> mechanism there? Because if there's a more Scala way of doing it, that
>>>> would make more sense. Otherwise, you can always add Serializable later,
>>>> but you shouldn't remove it once it's part of the public API.
>>>>
>>>> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com>
>>>> wrote:
>>>>
>>>>> I am asking this since I'm considering making the Scala Logger wrapper
>>>>> Serializable. Would that be a good idea?
>>>>>
>>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>>> mikael.staldal@magine.com> wrote:
>>>>>
>>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>>
>>>>>> I guess we could also document that fact if we don't want to mark the
>>>>>> interface Serializable.
>>>>>>
>>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>>
>>>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>>>
>>>>>>> Ralph
>>>>>>>
>>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>
>>>>>>> I don't think we should limit ourselves to what we add to the API
>>>>>>> just for the sake of alternative implementations.
>>>>>>>
>>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <
>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>
>>>>>>>> I do not think you want to _force_ all implementation to be
>>>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>>
>>>>>>>> Gary
>>>>>>>>
>>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>
>>>>>>>>> But if this is a feature that is useful for some users, why not
>>>>>>>>> fully advertise it by making the Logger interface Serializable?
>>>>>>>>>
>>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> It's Serializable because there was a feature request for it. The
>>>>>>>>>> jira ticket is internal (reported by Gary), but I recall either another bug
>>>>>>>>>> or a mailing list post where the justification was so that serializable
>>>>>>>>>> classes can still use a Logger instance field (not everyone uses a static
>>>>>>>>>> field for the Logger for some reason).
>>>>>>>>>>
>>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <ralph.goers@dslextreme.com
>>>>>>>>>> > wrote:
>>>>>>>>>>
>>>>>>>>>>> I asked myself the same question and I guess the answer is that
>>>>>>>>>>> Logger is included in lots of classes, many of which are Serializable. It
>>>>>>>>>>> would be easier for us to make AbstractLogger Serializable then for all the
>>>>>>>>>>> users to mark it as transient and have to manually instantiate the Logger
>>>>>>>>>>> during de-Serialization.
>>>>>>>>>>>
>>>>>>>>>>> Ralph
>>>>>>>>>>>
>>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I do not think there is a way to know what folks are doing out
>>>>>>>>>>>> there...
>>>>>>>>>>>>
>>>>>>>>>>>> Gary
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is
>>>>>>>>>>>>>>> not. Why is it so?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>
>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>
>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>> Senior software developer
>>>>>>>>>>>
>>>>>>>>>>> *Magine TV*
>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>>
>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>> reply email.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [image: MagineTV]
>>>>>>>>>
>>>>>>>>> *Mikael Ståldal*
>>>>>>>>> Senior software developer
>>>>>>>>>
>>>>>>>>> *Magine TV*
>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>
>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>> reply email.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>> Home: http://garygregory.com/
>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>> *Mikael Ståldal*
>>>>>> Senior software developer
>>>>>>
>>>>>> *Magine TV*
>>>>>> mikael.staldal@magine.com
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>
>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>> message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>> you should destroy this message and kindly notify the sender by reply
>>>>>> email.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Matt Sicker <bo...@gmail.com>
>>>>
>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
But maybe we actually want to force all implementations to be serializable?

On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <re...@gmail.com> wrote:

> I think the theory is it is preferable to let implementors of an interface
> implement java.io.Serializable instead of letting the interface extend
> java.io.Serializable. That gives future implementors the freedom to choose
> to either implement Serializable or not.
>
> On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <
> mikael.staldal@magine.com> wrote:
>
>> It seems like serializable logger is useful in Apache Spark, which is
>> popular to use from Scala.
>>
>> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com> wrote:
>>
>>> Do Scala programmers use Serializable a lot, or is there a better
>>> mechanism there? Because if there's a more Scala way of doing it, that
>>> would make more sense. Otherwise, you can always add Serializable later,
>>> but you shouldn't remove it once it's part of the public API.
>>>
>>> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com>
>>> wrote:
>>>
>>>> I am asking this since I'm considering making the Scala Logger wrapper
>>>> Serializable. Would that be a good idea?
>>>>
>>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>>> mikael.staldal@magine.com> wrote:
>>>>
>>>>> Users can rely on the fact that loggers are always Serializable.
>>>>>
>>>>> I guess we could also document that fact if we don't want to mark the
>>>>> interface Serializable.
>>>>>
>>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>>> ralph.goers@dslextreme.com> wrote:
>>>>>
>>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>>
>>>>>> Ralph
>>>>>>
>>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <
>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>
>>>>>> I don't think we should limit ourselves to what we add to the API
>>>>>> just for the sake of alternative implementations.
>>>>>>
>>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <garydgregory@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> I do not think you want to _force_ all implementation to be
>>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>>
>>>>>>> Gary
>>>>>>>
>>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>
>>>>>>>> But if this is a feature that is useful for some users, why not
>>>>>>>> fully advertise it by making the Logger interface Serializable?
>>>>>>>>
>>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> It's Serializable because there was a feature request for it. The
>>>>>>>>> jira ticket is internal (reported by Gary), but I recall either another bug
>>>>>>>>> or a mailing list post where the justification was so that serializable
>>>>>>>>> classes can still use a Logger instance field (not everyone uses a static
>>>>>>>>> field for the Logger for some reason).
>>>>>>>>>
>>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> I asked myself the same question and I guess the answer is that
>>>>>>>>>> Logger is included in lots of classes, many of which are Serializable. It
>>>>>>>>>> would be easier for us to make AbstractLogger Serializable then for all the
>>>>>>>>>> users to mark it as transient and have to manually instantiate the Logger
>>>>>>>>>> during de-Serialization.
>>>>>>>>>>
>>>>>>>>>> Ralph
>>>>>>>>>>
>>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>
>>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>>
>>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> I do not think there is a way to know what folks are doing out
>>>>>>>>>>> there...
>>>>>>>>>>>
>>>>>>>>>>> Gary
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Gary
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is
>>>>>>>>>>>>>> not. Why is it so?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained
>>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>>> (or responsible for delivery of the message to such a
>>>>>>>>>>>>>> person), you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>
>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>
>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>
>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>>> reply email.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>
>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>> Senior software developer
>>>>>>>>>>
>>>>>>>>>> *Magine TV*
>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>
>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>> reply email.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> [image: MagineTV]
>>>>>>>>
>>>>>>>> *Mikael Ståldal*
>>>>>>>> Senior software developer
>>>>>>>>
>>>>>>>> *Magine TV*
>>>>>>>> mikael.staldal@magine.com
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>
>>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>> reply email.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>> Home: http://garygregory.com/
>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>> *Mikael Ståldal*
>>>>>> Senior software developer
>>>>>>
>>>>>> *Magine TV*
>>>>>> mikael.staldal@magine.com
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>
>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>> message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>> you should destroy this message and kindly notify the sender by reply
>>>>>> email.
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>
>>>
>>>
>>> --
>>> Matt Sicker <bo...@gmail.com>
>>>
>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>


-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Remko Popma <re...@gmail.com>.
I think the theory is it is preferable to let implementors of an interface
implement java.io.Serializable instead of letting the interface extend
java.io.Serializable. That gives future implementors the freedom to choose
to either implement Serializable or not.

On Tue, Jul 26, 2016 at 12:49 AM, Mikael Ståldal <mi...@magine.com>
wrote:

> It seems like serializable logger is useful in Apache Spark, which is
> popular to use from Scala.
>
> On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com> wrote:
>
>> Do Scala programmers use Serializable a lot, or is there a better
>> mechanism there? Because if there's a more Scala way of doing it, that
>> would make more sense. Otherwise, you can always add Serializable later,
>> but you shouldn't remove it once it's part of the public API.
>>
>> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com>
>> wrote:
>>
>>> I am asking this since I'm considering making the Scala Logger wrapper
>>> Serializable. Would that be a good idea?
>>>
>>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>>> mikael.staldal@magine.com> wrote:
>>>
>>>> Users can rely on the fact that loggers are always Serializable.
>>>>
>>>> I guess we could also document that fact if we don't want to mark the
>>>> interface Serializable.
>>>>
>>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <
>>>> ralph.goers@dslextreme.com> wrote:
>>>>
>>>>> What advantage is gained by declaring the interface Serializable?
>>>>>
>>>>> Ralph
>>>>>
>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <mi...@magine.com>
>>>>> wrote:
>>>>>
>>>>> I don't think we should limit ourselves to what we add to the API just
>>>>> for the sake of alternative implementations.
>>>>>
>>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> I do not think you want to _force_ all implementation to be
>>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>>
>>>>>> Gary
>>>>>>
>>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>
>>>>>>> But if this is a feature that is useful for some users, why not
>>>>>>> fully advertise it by making the Logger interface Serializable?
>>>>>>>
>>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> It's Serializable because there was a feature request for it. The
>>>>>>>> jira ticket is internal (reported by Gary), but I recall either another bug
>>>>>>>> or a mailing list post where the justification was so that serializable
>>>>>>>> classes can still use a Logger instance field (not everyone uses a static
>>>>>>>> field for the Logger for some reason).
>>>>>>>>
>>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> I asked myself the same question and I guess the answer is that
>>>>>>>>> Logger is included in lots of classes, many of which are Serializable. It
>>>>>>>>> would be easier for us to make AbstractLogger Serializable then for all the
>>>>>>>>> users to mark it as transient and have to manually instantiate the Logger
>>>>>>>>> during de-Serialization.
>>>>>>>>>
>>>>>>>>> Ralph
>>>>>>>>>
>>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>
>>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>>> log4j-core, Serializable?
>>>>>>>>>
>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> I do not think there is a way to know what folks are doing out
>>>>>>>>>> there...
>>>>>>>>>>
>>>>>>>>>> Gary
>>>>>>>>>>
>>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>>
>>>>>>>>>>>> Gary
>>>>>>>>>>>>
>>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is
>>>>>>>>>>>>> not. Why is it so?
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>>
>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>>> you should destroy this message and kindly notify the sender
>>>>>>>>>>>>> by reply email.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>
>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>> Senior software developer
>>>>>>>>>>>
>>>>>>>>>>> *Magine TV*
>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>>
>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>> reply email.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>> <http://www.manning.com/tahchiev/>
>>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [image: MagineTV]
>>>>>>>>>
>>>>>>>>> *Mikael Ståldal*
>>>>>>>>> Senior software developer
>>>>>>>>>
>>>>>>>>> *Magine TV*
>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>
>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>> reply email.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>> <http://www.manning.com/bauer3/>
>>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>> Blog: http://garygregory.wordpress.com
>>>>>> Home: http://garygregory.com/
>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
It seems like serializable logger is useful in Apache Spark, which is
popular to use from Scala.

On Mon, Jul 25, 2016 at 4:20 PM, Matt Sicker <bo...@gmail.com> wrote:

> Do Scala programmers use Serializable a lot, or is there a better
> mechanism there? Because if there's a more Scala way of doing it, that
> would make more sense. Otherwise, you can always add Serializable later,
> but you shouldn't remove it once it's part of the public API.
>
> On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com>
> wrote:
>
>> I am asking this since I'm considering making the Scala Logger wrapper
>> Serializable. Would that be a good idea?
>>
>> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
>> mikael.staldal@magine.com> wrote:
>>
>>> Users can rely on the fact that loggers are always Serializable.
>>>
>>> I guess we could also document that fact if we don't want to mark the
>>> interface Serializable.
>>>
>>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <ralph.goers@dslextreme.com
>>> > wrote:
>>>
>>>> What advantage is gained by declaring the interface Serializable?
>>>>
>>>> Ralph
>>>>
>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <mi...@magine.com>
>>>> wrote:
>>>>
>>>> I don't think we should limit ourselves to what we add to the API just
>>>> for the sake of alternative implementations.
>>>>
>>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
>>>> wrote:
>>>>
>>>>> I do not think you want to _force_ all implementation to be
>>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>>
>>>>> Gary
>>>>>
>>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>>> mikael.staldal@magine.com> wrote:
>>>>>
>>>>>> But if this is a feature that is useful for some users, why not fully
>>>>>> advertise it by making the Logger interface Serializable?
>>>>>>
>>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> It's Serializable because there was a feature request for it. The
>>>>>>> jira ticket is internal (reported by Gary), but I recall either another bug
>>>>>>> or a mailing list post where the justification was so that serializable
>>>>>>> classes can still use a Logger instance field (not everyone uses a static
>>>>>>> field for the Logger for some reason).
>>>>>>>
>>>>>>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I asked myself the same question and I guess the answer is that
>>>>>>>> Logger is included in lots of classes, many of which are Serializable. It
>>>>>>>> would be easier for us to make AbstractLogger Serializable then for all the
>>>>>>>> users to mark it as transient and have to manually instantiate the Logger
>>>>>>>> during de-Serialization.
>>>>>>>>
>>>>>>>> Ralph
>>>>>>>>
>>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>
>>>>>>>> So then why is AbstractLogger, and our implementation in
>>>>>>>> log4j-core, Serializable?
>>>>>>>>
>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> I do not think there is a way to know what folks are doing out
>>>>>>>>> there...
>>>>>>>>>
>>>>>>>>> Gary
>>>>>>>>>
>>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>
>>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>>
>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>>> serialization to each provider.
>>>>>>>>>>>
>>>>>>>>>>> Gary
>>>>>>>>>>>
>>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is
>>>>>>>>>>>> not. Why is it so?
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>>
>>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>>> Senior software developer
>>>>>>>>>>>>
>>>>>>>>>>>> *Magine TV*
>>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |
>>>>>>>>>>>> www.magine.com
>>>>>>>>>>>>
>>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>>> reply email.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>
>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>> Senior software developer
>>>>>>>>>>
>>>>>>>>>> *Magine TV*
>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>
>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>> reply email.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> [image: MagineTV]
>>>>>>>>
>>>>>>>> *Mikael Ståldal*
>>>>>>>> Senior software developer
>>>>>>>>
>>>>>>>> *Magine TV*
>>>>>>>> mikael.staldal@magine.com
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>
>>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>> reply email.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>> *Mikael Ståldal*
>>>>>> Senior software developer
>>>>>>
>>>>>> *Magine TV*
>>>>>> mikael.staldal@magine.com
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>
>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>> message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>> you should destroy this message and kindly notify the sender by reply
>>>>>> email.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>> Java Persistence with Hibernate, Second Edition
>>>>> <http://www.manning.com/bauer3/>
>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>> Blog: http://garygregory.wordpress.com
>>>>> Home: http://garygregory.com/
>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>



-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Matt Sicker <bo...@gmail.com>.
Do Scala programmers use Serializable a lot, or is there a better mechanism
there? Because if there's a more Scala way of doing it, that would make
more sense. Otherwise, you can always add Serializable later, but you
shouldn't remove it once it's part of the public API.

On 25 July 2016 at 03:06, Mikael Ståldal <mi...@magine.com> wrote:

> I am asking this since I'm considering making the Scala Logger wrapper
> Serializable. Would that be a good idea?
>
> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
> mikael.staldal@magine.com> wrote:
>
>> Users can rely on the fact that loggers are always Serializable.
>>
>> I guess we could also document that fact if we don't want to mark the
>> interface Serializable.
>>
>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <ra...@dslextreme.com>
>> wrote:
>>
>>> What advantage is gained by declaring the interface Serializable?
>>>
>>> Ralph
>>>
>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <mi...@magine.com>
>>> wrote:
>>>
>>> I don't think we should limit ourselves to what we add to the API just
>>> for the sake of alternative implementations.
>>>
>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
>>> wrote:
>>>
>>>> I do not think you want to _force_ all implementation to be
>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>
>>>> Gary
>>>>
>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>> mikael.staldal@magine.com> wrote:
>>>>
>>>>> But if this is a feature that is useful for some users, why not fully
>>>>> advertise it by making the Logger interface Serializable?
>>>>>
>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>>
>>>>>> It's Serializable because there was a feature request for it. The
>>>>>> jira ticket is internal (reported by Gary), but I recall either another bug
>>>>>> or a mailing list post where the justification was so that serializable
>>>>>> classes can still use a Logger instance field (not everyone uses a static
>>>>>> field for the Logger for some reason).
>>>>>>
>>>>>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com>
>>>>>> wrote:
>>>>>>
>>>>>>> I asked myself the same question and I guess the answer is that
>>>>>>> Logger is included in lots of classes, many of which are Serializable. It
>>>>>>> would be easier for us to make AbstractLogger Serializable then for all the
>>>>>>> users to mark it as transient and have to manually instantiate the Logger
>>>>>>> during de-Serialization.
>>>>>>>
>>>>>>> Ralph
>>>>>>>
>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>
>>>>>>> So then why is AbstractLogger, and our implementation in log4j-core,
>>>>>>> Serializable?
>>>>>>>
>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>
>>>>>>>> I do not think there is a way to know what folks are doing out
>>>>>>>> there...
>>>>>>>>
>>>>>>>> Gary
>>>>>>>>
>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>
>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>
>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>> serialization to each provider.
>>>>>>>>>>
>>>>>>>>>> Gary
>>>>>>>>>>
>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is not.
>>>>>>>>>>> Why is it so?
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>
>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>> Senior software developer
>>>>>>>>>>>
>>>>>>>>>>> *Magine TV*
>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>>
>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>> reply email.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [image: MagineTV]
>>>>>>>>>
>>>>>>>>> *Mikael Ståldal*
>>>>>>>>> Senior software developer
>>>>>>>>>
>>>>>>>>> *Magine TV*
>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>
>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>> reply email.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>> Home: http://garygregory.com/
>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>> Java Persistence with Hibernate, Second Edition
>>>> <http://www.manning.com/bauer3/>
>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>> Blog: http://garygregory.wordpress.com
>>>> Home: http://garygregory.com/
>>>> Tweet! http://twitter.com/GaryGregory
>>>>
>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>>
>>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
Matt Sicker <bo...@gmail.com>

Re: Serializable Logger

Posted by Gary Gregory <ga...@gmail.com>.
It feels like we need an epic to get our overall story straight on
serialization, including docs on what works, doesn't, and what we plan to
have working.

Gary

On Jul 25, 2016 1:06 AM, "Mikael Ståldal" <mi...@magine.com> wrote:

> I am asking this since I'm considering making the Scala Logger wrapper
> Serializable. Would that be a good idea?
>
> On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <
> mikael.staldal@magine.com> wrote:
>
>> Users can rely on the fact that loggers are always Serializable.
>>
>> I guess we could also document that fact if we don't want to mark the
>> interface Serializable.
>>
>> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <ra...@dslextreme.com>
>> wrote:
>>
>>> What advantage is gained by declaring the interface Serializable?
>>>
>>> Ralph
>>>
>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <mi...@magine.com>
>>> wrote:
>>>
>>> I don't think we should limit ourselves to what we add to the API just
>>> for the sake of alternative implementations.
>>>
>>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
>>> wrote:
>>>
>>>> I do not think you want to _force_ all implementation to be
>>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>>
>>>> Gary
>>>>
>>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>>> mikael.staldal@magine.com> wrote:
>>>>
>>>>> But if this is a feature that is useful for some users, why not fully
>>>>> advertise it by making the Logger interface Serializable?
>>>>>
>>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>>
>>>>>> It's Serializable because there was a feature request for it. The
>>>>>> jira ticket is internal (reported by Gary), but I recall either another bug
>>>>>> or a mailing list post where the justification was so that serializable
>>>>>> classes can still use a Logger instance field (not everyone uses a static
>>>>>> field for the Logger for some reason).
>>>>>>
>>>>>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com>
>>>>>> wrote:
>>>>>>
>>>>>>> I asked myself the same question and I guess the answer is that
>>>>>>> Logger is included in lots of classes, many of which are Serializable. It
>>>>>>> would be easier for us to make AbstractLogger Serializable then for all the
>>>>>>> users to mark it as transient and have to manually instantiate the Logger
>>>>>>> during de-Serialization.
>>>>>>>
>>>>>>> Ralph
>>>>>>>
>>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>
>>>>>>> So then why is AbstractLogger, and our implementation in log4j-core,
>>>>>>> Serializable?
>>>>>>>
>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <
>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>
>>>>>>>> I do not think there is a way to know what folks are doing out
>>>>>>>> there...
>>>>>>>>
>>>>>>>> Gary
>>>>>>>>
>>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>
>>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>>
>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Probably to leave the decision on whether to support
>>>>>>>>>> serialization to each provider.
>>>>>>>>>>
>>>>>>>>>> Gary
>>>>>>>>>>
>>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is not.
>>>>>>>>>>> Why is it so?
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>>
>>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>>> Senior software developer
>>>>>>>>>>>
>>>>>>>>>>> *Magine TV*
>>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>>
>>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>>> reply email.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [image: MagineTV]
>>>>>>>>>
>>>>>>>>> *Mikael Ståldal*
>>>>>>>>> Senior software developer
>>>>>>>>>
>>>>>>>>> *Magine TV*
>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>
>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>> reply email.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>> Home: http://garygregory.com/
>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>> Java Persistence with Hibernate, Second Edition
>>>> <http://www.manning.com/bauer3/>
>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>> Blog: http://garygregory.wordpress.com
>>>> Home: http://garygregory.com/
>>>> Tweet! http://twitter.com/GaryGregory
>>>>
>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>>
>>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
I am asking this since I'm considering making the Scala Logger wrapper
Serializable. Would that be a good idea?

On Mon, Jul 25, 2016 at 10:00 AM, Mikael Ståldal <mi...@magine.com>
wrote:

> Users can rely on the fact that loggers are always Serializable.
>
> I guess we could also document that fact if we don't want to mark the
> interface Serializable.
>
> On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <ra...@dslextreme.com>
> wrote:
>
>> What advantage is gained by declaring the interface Serializable?
>>
>> Ralph
>>
>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <mi...@magine.com>
>> wrote:
>>
>> I don't think we should limit ourselves to what we add to the API just
>> for the sake of alternative implementations.
>>
>> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>>
>>> I do not think you want to _force_ all implementation to be
>>> serializable. Serialization is not a main feature of loggers, logging is.
>>>
>>> Gary
>>>
>>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>>> mikael.staldal@magine.com> wrote:
>>>
>>>> But if this is a feature that is useful for some users, why not fully
>>>> advertise it by making the Logger interface Serializable?
>>>>
>>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>>
>>>>> It's Serializable because there was a feature request for it. The jira
>>>>> ticket is internal (reported by Gary), but I recall either another bug or a
>>>>> mailing list post where the justification was so that serializable classes
>>>>> can still use a Logger instance field (not everyone uses a static field for
>>>>> the Logger for some reason).
>>>>>
>>>>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com>
>>>>> wrote:
>>>>>
>>>>>> I asked myself the same question and I guess the answer is that
>>>>>> Logger is included in lots of classes, many of which are Serializable. It
>>>>>> would be easier for us to make AbstractLogger Serializable then for all the
>>>>>> users to mark it as transient and have to manually instantiate the Logger
>>>>>> during de-Serialization.
>>>>>>
>>>>>> Ralph
>>>>>>
>>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <
>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>
>>>>>> So then why is AbstractLogger, and our implementation in log4j-core,
>>>>>> Serializable?
>>>>>>
>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <garydgregory@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> I do not think there is a way to know what folks are doing out
>>>>>>> there...
>>>>>>>
>>>>>>> Gary
>>>>>>>
>>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>
>>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>>
>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Probably to leave the decision on whether to support serialization
>>>>>>>>> to each provider.
>>>>>>>>>
>>>>>>>>> Gary
>>>>>>>>>
>>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>>
>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is not.
>>>>>>>>>> Why is it so?
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> [image: MagineTV]
>>>>>>>>>>
>>>>>>>>>> *Mikael Ståldal*
>>>>>>>>>> Senior software developer
>>>>>>>>>>
>>>>>>>>>> *Magine TV*
>>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>>
>>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>>> (or responsible for delivery of the message to such a person),
>>>>>>>>>> you may not copy or deliver this message to anyone. In such case,
>>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>>> reply email.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> [image: MagineTV]
>>>>>>>>
>>>>>>>> *Mikael Ståldal*
>>>>>>>> Senior software developer
>>>>>>>>
>>>>>>>> *Magine TV*
>>>>>>>> mikael.staldal@magine.com
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>
>>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>> reply email.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>> <http://www.manning.com/bauer3/>
>>>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>> Home: http://garygregory.com/
>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>> *Mikael Ståldal*
>>>>>> Senior software developer
>>>>>>
>>>>>> *Magine TV*
>>>>>> mikael.staldal@magine.com
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>
>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>> message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>> you should destroy this message and kindly notify the sender by reply
>>>>>> email.
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Matt Sicker <bo...@gmail.com>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>
>>>
>>>
>>> --
>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>> Java Persistence with Hibernate, Second Edition
>>> <http://www.manning.com/bauer3/>
>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>> Spring Batch in Action <http://www.manning.com/templier/>
>>> Blog: http://garygregory.wordpress.com
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory
>>>
>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>>
>>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
Users can rely on the fact that loggers are always Serializable.

I guess we could also document that fact if we don't want to mark the
interface Serializable.

On Fri, Jul 22, 2016 at 7:16 PM, Ralph Goers <ra...@dslextreme.com>
wrote:

> What advantage is gained by declaring the interface Serializable?
>
> Ralph
>
> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <mi...@magine.com>
> wrote:
>
> I don't think we should limit ourselves to what we add to the API just for
> the sake of alternative implementations.
>
> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
> wrote:
>
>> I do not think you want to _force_ all implementation to be serializable.
>> Serialization is not a main feature of loggers, logging is.
>>
>> Gary
>>
>> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
>> mikael.staldal@magine.com> wrote:
>>
>>> But if this is a feature that is useful for some users, why not fully
>>> advertise it by making the Logger interface Serializable?
>>>
>>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>
>>>> It's Serializable because there was a feature request for it. The jira
>>>> ticket is internal (reported by Gary), but I recall either another bug or a
>>>> mailing list post where the justification was so that serializable classes
>>>> can still use a Logger instance field (not everyone uses a static field for
>>>> the Logger for some reason).
>>>>
>>>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com>
>>>> wrote:
>>>>
>>>>> I asked myself the same question and I guess the answer is that Logger
>>>>> is included in lots of classes, many of which are Serializable. It would be
>>>>> easier for us to make AbstractLogger Serializable then for all the users to
>>>>> mark it as transient and have to manually instantiate the Logger during
>>>>> de-Serialization.
>>>>>
>>>>> Ralph
>>>>>
>>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <mi...@magine.com>
>>>>> wrote:
>>>>>
>>>>> So then why is AbstractLogger, and our implementation in log4j-core,
>>>>> Serializable?
>>>>>
>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <ga...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> I do not think there is a way to know what folks are doing out
>>>>>> there...
>>>>>>
>>>>>> Gary
>>>>>>
>>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>
>>>>>>> Are there any providers not using AbstractLogger?
>>>>>>>
>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <
>>>>>>> garydgregory@gmail.com> wrote:
>>>>>>>
>>>>>>>> Probably to leave the decision on whether to support serialization
>>>>>>>> to each provider.
>>>>>>>>
>>>>>>>> Gary
>>>>>>>>
>>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <
>>>>>>>> mikael.staldal@magine.com> wrote:
>>>>>>>>
>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is not.
>>>>>>>>> Why is it so?
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [image: MagineTV]
>>>>>>>>>
>>>>>>>>> *Mikael Ståldal*
>>>>>>>>> Senior software developer
>>>>>>>>>
>>>>>>>>> *Magine TV*
>>>>>>>>> mikael.staldal@magine.com
>>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>>
>>>>>>>>> Privileged and/or Confidential Information may be contained in
>>>>>>>>> this message. If you are not the addressee indicated in this message
>>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>>> reply email.
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>> <http://www.manning.com/bauer3/>
>>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>>> Blog: http://garygregory.wordpress.com
>>>>>> Home: http://garygregory.com/
>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Matt Sicker <bo...@gmail.com>
>>>>
>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition
>> <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>
>
>


-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Ralph Goers <ra...@dslextreme.com>.
What advantage is gained by declaring the interface Serializable?

Ralph

> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal <mi...@magine.com> wrote:
> 
> I don't think we should limit ourselves to what we add to the API just for the sake of alternative implementations.
> 
> On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <garydgregory@gmail.com <ma...@gmail.com>> wrote:
> I do not think you want to _force_ all implementation to be serializable. Serialization is not a main feature of loggers, logging is.
> 
> Gary
> 
> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
> But if this is a feature that is useful for some users, why not fully advertise it by making the Logger interface Serializable?
> 
> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <boards@gmail.com <ma...@gmail.com>> wrote:
> It's Serializable because there was a feature request for it. The jira ticket is internal (reported by Gary), but I recall either another bug or a mailing list post where the justification was so that serializable classes can still use a Logger instance field (not everyone uses a static field for the Logger for some reason).
> 
> On 21 July 2016 at 11:32, Ralph Goers <ralph.goers@dslextreme.com <ma...@dslextreme.com>> wrote:
> I asked myself the same question and I guess the answer is that Logger is included in lots of classes, many of which are Serializable. It would be easier for us to make AbstractLogger Serializable then for all the users to mark it as transient and have to manually instantiate the Logger during de-Serialization.
> 
> Ralph
> 
>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
>> 
>> So then why is AbstractLogger, and our implementation in log4j-core, Serializable?
>> 
>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <garydgregory@gmail.com <ma...@gmail.com>> wrote:
>> I do not think there is a way to know what folks are doing out there...
>> 
>> Gary
>> 
>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
>> Are there any providers not using AbstractLogger?
>> 
>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <garydgregory@gmail.com <ma...@gmail.com>> wrote:
>> Probably to leave the decision on whether to support serialization to each provider.
>> 
>> Gary
>> 
>> 
>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mikael.staldal@magine.com <ma...@magine.com>> wrote:
>> AbstractLogger is Serializable, but the Logger interface is not. Why is it so?
>> 
>> -- 
>>  
>> 
>> Mikael Ståldal
>> Senior software developer 
>> 
>> Magine TV
>> mikael.staldal@magine.com <ma...@magine.com>    
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
>> 
>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>> you should destroy this message and kindly notify the sender by reply email.   
>> 
>> 
>> 
>> -- 
>>  
>> 
>> Mikael Ståldal
>> Senior software developer 
>> 
>> Magine TV
>> mikael.staldal@magine.com <ma...@magine.com>    
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
>> 
>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>> you should destroy this message and kindly notify the sender by reply email.   
>> 
>> 
>> 
>> -- 
>> E-Mail: garydgregory@gmail.com <ma...@gmail.com> | ggregory@apache.org  <ma...@apache.org>
>> Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> 
>> Home: http://garygregory.com/ <http://garygregory.com/>
>> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
>> 
>> 
>> -- 
>>  
>> 
>> Mikael Ståldal
>> Senior software developer 
>> 
>> Magine TV
>> mikael.staldal@magine.com <ma...@magine.com>    
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
>> 
>> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
>> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> 
> -- 
> Matt Sicker <boards@gmail.com <ma...@gmail.com>>
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> -- 
> E-Mail: garydgregory@gmail.com <ma...@gmail.com> | ggregory@apache.org  <ma...@apache.org>
> Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> 
> Home: http://garygregory.com/ <http://garygregory.com/>
> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   


Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
I don't think we should limit ourselves to what we add to the API just for
the sake of alternative implementations.

On Fri, Jul 22, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
wrote:

> I do not think you want to _force_ all implementation to be serializable.
> Serialization is not a main feature of loggers, logging is.
>
> Gary
>
> On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <
> mikael.staldal@magine.com> wrote:
>
>> But if this is a feature that is useful for some users, why not fully
>> advertise it by making the Logger interface Serializable?
>>
>> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com> wrote:
>>
>>> It's Serializable because there was a feature request for it. The jira
>>> ticket is internal (reported by Gary), but I recall either another bug or a
>>> mailing list post where the justification was so that serializable classes
>>> can still use a Logger instance field (not everyone uses a static field for
>>> the Logger for some reason).
>>>
>>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com>
>>> wrote:
>>>
>>>> I asked myself the same question and I guess the answer is that Logger
>>>> is included in lots of classes, many of which are Serializable. It would be
>>>> easier for us to make AbstractLogger Serializable then for all the users to
>>>> mark it as transient and have to manually instantiate the Logger during
>>>> de-Serialization.
>>>>
>>>> Ralph
>>>>
>>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <mi...@magine.com>
>>>> wrote:
>>>>
>>>> So then why is AbstractLogger, and our implementation in log4j-core,
>>>> Serializable?
>>>>
>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <ga...@gmail.com>
>>>> wrote:
>>>>
>>>>> I do not think there is a way to know what folks are doing out there...
>>>>>
>>>>> Gary
>>>>>
>>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>>> mikael.staldal@magine.com> wrote:
>>>>>
>>>>>> Are there any providers not using AbstractLogger?
>>>>>>
>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <garydgregory@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Probably to leave the decision on whether to support serialization
>>>>>>> to each provider.
>>>>>>>
>>>>>>> Gary
>>>>>>>
>>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mi...@magine.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> AbstractLogger is Serializable, but the Logger interface is not.
>>>>>>>> Why is it so?
>>>>>>>>
>>>>>>>> --
>>>>>>>> [image: MagineTV]
>>>>>>>>
>>>>>>>> *Mikael Ståldal*
>>>>>>>> Senior software developer
>>>>>>>>
>>>>>>>> *Magine TV*
>>>>>>>> mikael.staldal@magine.com
>>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>>
>>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>>> reply email.
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>> *Mikael Ståldal*
>>>>>> Senior software developer
>>>>>>
>>>>>> *Magine TV*
>>>>>> mikael.staldal@magine.com
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>
>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>> message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>> you should destroy this message and kindly notify the sender by reply
>>>>>> email.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>> Java Persistence with Hibernate, Second Edition
>>>>> <http://www.manning.com/bauer3/>
>>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>>> Blog: http://garygregory.wordpress.com
>>>>> Home: http://garygregory.com/
>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Matt Sicker <bo...@gmail.com>
>>>
>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Gary Gregory <ga...@gmail.com>.
I do not think you want to _force_ all implementation to be serializable.
Serialization is not a main feature of loggers, logging is.

Gary

On Fri, Jul 22, 2016 at 12:45 AM, Mikael Ståldal <mi...@magine.com>
wrote:

> But if this is a feature that is useful for some users, why not fully
> advertise it by making the Logger interface Serializable?
>
> On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com> wrote:
>
>> It's Serializable because there was a feature request for it. The jira
>> ticket is internal (reported by Gary), but I recall either another bug or a
>> mailing list post where the justification was so that serializable classes
>> can still use a Logger instance field (not everyone uses a static field for
>> the Logger for some reason).
>>
>> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com> wrote:
>>
>>> I asked myself the same question and I guess the answer is that Logger
>>> is included in lots of classes, many of which are Serializable. It would be
>>> easier for us to make AbstractLogger Serializable then for all the users to
>>> mark it as transient and have to manually instantiate the Logger during
>>> de-Serialization.
>>>
>>> Ralph
>>>
>>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <mi...@magine.com>
>>> wrote:
>>>
>>> So then why is AbstractLogger, and our implementation in log4j-core,
>>> Serializable?
>>>
>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <ga...@gmail.com>
>>> wrote:
>>>
>>>> I do not think there is a way to know what folks are doing out there...
>>>>
>>>> Gary
>>>>
>>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>>> mikael.staldal@magine.com> wrote:
>>>>
>>>>> Are there any providers not using AbstractLogger?
>>>>>
>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Probably to leave the decision on whether to support serialization to
>>>>>> each provider.
>>>>>>
>>>>>> Gary
>>>>>>
>>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mi...@magine.com>
>>>>>> wrote:
>>>>>>
>>>>>>> AbstractLogger is Serializable, but the Logger interface is not. Why
>>>>>>> is it so?
>>>>>>>
>>>>>>> --
>>>>>>> [image: MagineTV]
>>>>>>>
>>>>>>> *Mikael Ståldal*
>>>>>>> Senior software developer
>>>>>>>
>>>>>>> *Magine TV*
>>>>>>> mikael.staldal@magine.com
>>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>>
>>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>>> message. If you are not the addressee indicated in this message
>>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>>> you should destroy this message and kindly notify the sender by
>>>>>>> reply email.
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>> Java Persistence with Hibernate, Second Edition
>>>> <http://www.manning.com/bauer3/>
>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>> Blog: http://garygregory.wordpress.com
>>>> Home: http://garygregory.com/
>>>> Tweet! http://twitter.com/GaryGregory
>>>>
>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>>
>>>
>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
But if this is a feature that is useful for some users, why not fully
advertise it by making the Logger interface Serializable?

On Thu, Jul 21, 2016 at 7:53 PM, Matt Sicker <bo...@gmail.com> wrote:

> It's Serializable because there was a feature request for it. The jira
> ticket is internal (reported by Gary), but I recall either another bug or a
> mailing list post where the justification was so that serializable classes
> can still use a Logger instance field (not everyone uses a static field for
> the Logger for some reason).
>
> On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com> wrote:
>
>> I asked myself the same question and I guess the answer is that Logger is
>> included in lots of classes, many of which are Serializable. It would be
>> easier for us to make AbstractLogger Serializable then for all the users to
>> mark it as transient and have to manually instantiate the Logger during
>> de-Serialization.
>>
>> Ralph
>>
>> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <mi...@magine.com>
>> wrote:
>>
>> So then why is AbstractLogger, and our implementation in log4j-core,
>> Serializable?
>>
>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>>
>>> I do not think there is a way to know what folks are doing out there...
>>>
>>> Gary
>>>
>>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>>> mikael.staldal@magine.com> wrote:
>>>
>>>> Are there any providers not using AbstractLogger?
>>>>
>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
>>>> wrote:
>>>>
>>>>> Probably to leave the decision on whether to support serialization to
>>>>> each provider.
>>>>>
>>>>> Gary
>>>>>
>>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mi...@magine.com>
>>>>> wrote:
>>>>>
>>>>>> AbstractLogger is Serializable, but the Logger interface is not. Why
>>>>>> is it so?
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>> *Mikael Ståldal*
>>>>>> Senior software developer
>>>>>>
>>>>>> *Magine TV*
>>>>>> mikael.staldal@magine.com
>>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>>
>>>>>> Privileged and/or Confidential Information may be contained in this
>>>>>> message. If you are not the addressee indicated in this message
>>>>>> (or responsible for delivery of the message to such a person), you
>>>>>> may not copy or deliver this message to anyone. In such case,
>>>>>> you should destroy this message and kindly notify the sender by reply
>>>>>> email.
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>
>>>
>>>
>>> --
>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>> Java Persistence with Hibernate, Second Edition
>>> <http://www.manning.com/bauer3/>
>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>> Spring Batch in Action <http://www.manning.com/templier/>
>>> Blog: http://garygregory.wordpress.com
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory
>>>
>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>>
>>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>



-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Matt Sicker <bo...@gmail.com>.
It's Serializable because there was a feature request for it. The jira
ticket is internal (reported by Gary), but I recall either another bug or a
mailing list post where the justification was so that serializable classes
can still use a Logger instance field (not everyone uses a static field for
the Logger for some reason).

On 21 July 2016 at 11:32, Ralph Goers <ra...@dslextreme.com> wrote:

> I asked myself the same question and I guess the answer is that Logger is
> included in lots of classes, many of which are Serializable. It would be
> easier for us to make AbstractLogger Serializable then for all the users to
> mark it as transient and have to manually instantiate the Logger during
> de-Serialization.
>
> Ralph
>
> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <mi...@magine.com>
> wrote:
>
> So then why is AbstractLogger, and our implementation in log4j-core,
> Serializable?
>
> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <ga...@gmail.com>
> wrote:
>
>> I do not think there is a way to know what folks are doing out there...
>>
>> Gary
>>
>> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <
>> mikael.staldal@magine.com> wrote:
>>
>>> Are there any providers not using AbstractLogger?
>>>
>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
>>> wrote:
>>>
>>>> Probably to leave the decision on whether to support serialization to
>>>> each provider.
>>>>
>>>> Gary
>>>>
>>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mi...@magine.com>
>>>> wrote:
>>>>
>>>>> AbstractLogger is Serializable, but the Logger interface is not. Why
>>>>> is it so?
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>> *Mikael Ståldal*
>>>>> Senior software developer
>>>>>
>>>>> *Magine TV*
>>>>> mikael.staldal@magine.com
>>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>>
>>>>> Privileged and/or Confidential Information may be contained in this
>>>>> message. If you are not the addressee indicated in this message
>>>>> (or responsible for delivery of the message to such a person), you may
>>>>> not copy or deliver this message to anyone. In such case,
>>>>> you should destroy this message and kindly notify the sender by reply
>>>>> email.
>>>>>
>>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition
>> <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>
>
>


-- 
Matt Sicker <bo...@gmail.com>

Re: Serializable Logger

Posted by Ralph Goers <ra...@dslextreme.com>.
I asked myself the same question and I guess the answer is that Logger is included in lots of classes, many of which are Serializable. It would be easier for us to make AbstractLogger Serializable then for all the users to mark it as transient and have to manually instantiate the Logger during de-Serialization.

Ralph

> On Jul 21, 2016, at 9:29 AM, Mikael Ståldal <mi...@magine.com> wrote:
> 
> So then why is AbstractLogger, and our implementation in log4j-core, Serializable?
> 
> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <garydgregory@gmail.com <ma...@gmail.com>> wrote:
> I do not think there is a way to know what folks are doing out there...
> 
> Gary
> 
> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
> Are there any providers not using AbstractLogger?
> 
> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <garydgregory@gmail.com <ma...@gmail.com>> wrote:
> Probably to leave the decision on whether to support serialization to each provider.
> 
> Gary
> 
> 
> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mikael.staldal@magine.com <ma...@magine.com>> wrote:
> AbstractLogger is Serializable, but the Logger interface is not. Why is it so?
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> -- 
> E-Mail: garydgregory@gmail.com <ma...@gmail.com> | ggregory@apache.org  <ma...@apache.org>
> Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> 
> Home: http://garygregory.com/ <http://garygregory.com/>
> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   


Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
So then why is AbstractLogger, and our implementation in log4j-core,
Serializable?

On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory <ga...@gmail.com>
wrote:

> I do not think there is a way to know what folks are doing out there...
>
> Gary
>
> On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <mikael.staldal@magine.com
> > wrote:
>
>> Are there any providers not using AbstractLogger?
>>
>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>>
>>> Probably to leave the decision on whether to support serialization to
>>> each provider.
>>>
>>> Gary
>>>
>>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mi...@magine.com>
>>> wrote:
>>>
>>>> AbstractLogger is Serializable, but the Logger interface is not. Why is
>>>> it so?
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Gary Gregory <ga...@gmail.com>.
I do not think there is a way to know what folks are doing out there...

Gary

On Thu, Jul 21, 2016 at 9:13 AM, Mikael Ståldal <mi...@magine.com>
wrote:

> Are there any providers not using AbstractLogger?
>
> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
> wrote:
>
>> Probably to leave the decision on whether to support serialization to
>> each provider.
>>
>> Gary
>>
>> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mi...@magine.com>
>> wrote:
>>
>>> AbstractLogger is Serializable, but the Logger interface is not. Why is
>>> it so?
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Serializable Logger

Posted by Mikael Ståldal <mi...@magine.com>.
Are there any providers not using AbstractLogger?

On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory <ga...@gmail.com>
wrote:

> Probably to leave the decision on whether to support serialization to each
> provider.
>
> Gary
>
> On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mi...@magine.com>
> wrote:
>
>> AbstractLogger is Serializable, but the Logger interface is not. Why is
>> it so?
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>


-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Serializable Logger

Posted by Gary Gregory <ga...@gmail.com>.
Probably to leave the decision on whether to support serialization to each
provider.

Gary

On Jul 21, 2016 3:14 AM, "Mikael Ståldal" <mi...@magine.com> wrote:

> AbstractLogger is Serializable, but the Logger interface is not. Why is it
> so?
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>