Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Logback: the reliable, generic, fast and flexible logging framework. Copyright (C) 1999-2011, All rights reserved. This program and the accompanying materials are dual-licensed under either the terms of the Eclipse Public License v1.0 as published by the Eclipse Foundation or (per the licensee's choosing) under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.
package ch.qos.logback.classic.spi;
LoggerContextVO offers a restricted view of LoggerContext intended to be exposed by LoggingEvent to remote systems. This restricted view is optimized for serialization.

Some of the LoggerContext or Logger attributes MUST not survive serialization, e.g appenders, level values etc, as these attributes may have other values on the remote platform. LoggerContextVO class exposes the minimal and relevant attributes to the remote host, instead of having to deal with an incomplete LoggerContext with many null references.

Ceki Gülcü
Sébastien Pennec
public class LoggerContextVO implements Serializable {
  private static final long serialVersionUID = 5488023392483144387L;
  final String name;
  final Map<StringStringpropertyMap;
  final long birthTime;
  public LoggerContextVO(LoggerContext lc) {
    this. = lc.getName();
    this. = lc.getCopyOfPropertyMap();
    this. = lc.getBirthTime();
  public LoggerContextVO(String nameMap<String,StringpropertyMaplong birthTime) {
    this. = name;
    this. = propertyMap;
    this. = birthTime;
  public String getName() {
    return ;
  public Map<StringStringgetPropertyMap() {
    return ;
  public long getBirthTime() {
    return ;
New to GrepCode? Check out our FAQ X