But maybe we actually want to force all implementations to be serializable?
On Mon, Jul 25, 2016 at 6:01 PM, Remko Popma <[email protected]> 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 < > [email protected]> 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 <[email protected]> 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 <[email protected]> >>> 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 < >>>> [email protected]> 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 < >>>>> [email protected]> wrote: >>>>> >>>>>> What advantage is gained by declaring the interface Serializable? >>>>>> >>>>>> Ralph >>>>>> >>>>>> On Jul 22, 2016, at 9:38 AM, Mikael Ståldal < >>>>>> [email protected]> 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 <[email protected] >>>>>> > 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 < >>>>>>> [email protected]> 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 <[email protected]> >>>>>>>> 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 <[email protected]> >>>>>>>>> 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 < >>>>>>>>>> [email protected]> wrote: >>>>>>>>>> >>>>>>>>>> So then why is AbstractLogger, and our implementation in >>>>>>>>>> log4j-core, Serializable? >>>>>>>>>> >>>>>>>>>> On Thu, Jul 21, 2016 at 6:18 PM, Gary Gregory < >>>>>>>>>> [email protected]> 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 < >>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>> >>>>>>>>>>>> Are there any providers not using AbstractLogger? >>>>>>>>>>>> >>>>>>>>>>>> On Thu, Jul 21, 2016 at 6:09 PM, Gary Gregory < >>>>>>>>>>>> [email protected]> 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" < >>>>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> AbstractLogger is Serializable, but the Logger interface is >>>>>>>>>>>>>> not. Why is it so? >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> [image: MagineTV] >>>>>>>>>>>>>> >>>>>>>>>>>>>> *Mikael Ståldal* >>>>>>>>>>>>>> Senior software developer >>>>>>>>>>>>>> >>>>>>>>>>>>>> *Magine TV* >>>>>>>>>>>>>> [email protected] >>>>>>>>>>>>>> Grev Turegatan 3 | 114 46 Stockholm, Sweden | >>>>>>>>>>>>>> www.magine.com >>>>>>>>>>>>>> >>>>>>>>>>>>>> Privileged and/or Confidential Information may be contained >>>>>>>>>>>>>> in this message. If you are not the addressee indicated in this >>>>>>>>>>>>>> message >>>>>>>>>>>>>> (or responsible for delivery of the message to such a >>>>>>>>>>>>>> person), you may 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* >>>>>>>>>>>> [email protected] >>>>>>>>>>>> Grev Turegatan 3 | 114 46 Stockholm, Sweden | >>>>>>>>>>>> www.magine.com >>>>>>>>>>>> >>>>>>>>>>>> Privileged and/or Confidential Information may be contained in >>>>>>>>>>>> this message. If you are not the addressee indicated in this >>>>>>>>>>>> message >>>>>>>>>>>> (or responsible for delivery of the message to such a person), >>>>>>>>>>>> you may 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: [email protected] | [email protected] >>>>>>>>>>> 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* >>>>>>>>>> [email protected] >>>>>>>>>> Grev Turegatan 3 | 114 46 Stockholm, Sweden | www.magine.com >>>>>>>>>> >>>>>>>>>> Privileged and/or Confidential Information may be contained in >>>>>>>>>> this message. If you are not the addressee indicated in this message >>>>>>>>>> (or responsible for delivery of the message to such a person), >>>>>>>>>> you may 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 <[email protected]> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> [image: MagineTV] >>>>>>>> >>>>>>>> *Mikael Ståldal* >>>>>>>> Senior software developer >>>>>>>> >>>>>>>> *Magine TV* >>>>>>>> [email protected] >>>>>>>> Grev Turegatan 3 | 114 46 Stockholm, Sweden | www.magine.com >>>>>>>> >>>>>>>> Privileged and/or Confidential Information may be contained in this >>>>>>>> message. If you are not the addressee indicated in this message >>>>>>>> (or responsible for delivery of the message to such a person), you >>>>>>>> may 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: [email protected] | [email protected] >>>>>>> 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* >>>>>> [email protected] >>>>>> Grev Turegatan 3 | 114 46 Stockholm, Sweden | www.magine.com >>>>>> >>>>>> Privileged and/or Confidential Information may be contained in this >>>>>> message. If you are not the addressee indicated in this message >>>>>> (or responsible for delivery of the message to such a person), you >>>>>> may 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* >>>>> [email protected] >>>>> Grev Turegatan 3 | 114 46 Stockholm, Sweden | www.magine.com >>>>> >>>>> Privileged and/or Confidential Information may be contained in this >>>>> message. If you are not the addressee indicated in this message >>>>> (or responsible for delivery of the message to such a person), you may >>>>> 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* >>>> [email protected] >>>> Grev Turegatan 3 | 114 46 Stockholm, Sweden | www.magine.com >>>> >>>> Privileged and/or Confidential Information may be contained in this >>>> message. If you are not the addressee indicated in this message >>>> (or responsible for delivery of the message to such a person), you may >>>> 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 <[email protected]> >>> >> >> >> >> -- >> [image: MagineTV] >> >> *Mikael Ståldal* >> Senior software developer >> >> *Magine TV* >> [email protected] >> Grev Turegatan 3 | 114 46 Stockholm, Sweden | www.magine.com >> >> Privileged and/or Confidential Information may be contained in this >> message. If you are not the addressee indicated in this message >> (or responsible for delivery of the message to such a person), you may >> 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* [email protected] Grev Turegatan 3 | 114 46 Stockholm, Sweden | www.magine.com Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email.
