It would be a neat trick to only use the logger name for ser/deser. But a
logger only exists in a LC, so how would you re-create the Logger object.
LogManager.getLogger(String) can't account for the message factory for
example. Would knowing the class within which the static Logger resides be
enough to know which LC to use? I do not see how :-( I think we need
Ralph's insight here.

The alternative would be... to recommend that all Logger declarations be
transient? That does not seen realistic, especially accounting for code you
cannot change.

Gary

On Wed, Oct 14, 2015 at 2:48 PM, Matt Sicker <[email protected]> wrote:

> Perhaps besides a particular LoggerContext. I have an idea on how to
> significantly simplify the serialization of Logger, and if we can simply
> unserialize it based purely on its name, then that would save a lot of
> trouble. I don't remember if we've discussed this idea in the past, but I
> think this would be the best way to implement serialization in Logger. I
> wouldn't want to pass a Logger over the wire and clobber a possibly
> different configuration already in memory at the time, for instance.
>
> --
> Matt Sicker <[email protected]>
>



-- 
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

Reply via email to