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, QOS.ch. 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;
 
 import java.util.Map;
 

A flexible layout configurable with pattern string. The goal of this class is to format a ch.qos.logback.classic.spi.ILoggingEvent and return the results in a {#link String}. The format of the result depends on the conversion pattern.

For more information about this layout, please refer to the online manual at http://logback.qos.ch/manual/layouts.html#PatternLayout

 
 
 public class PatternLayout extends PatternLayoutBase<ILoggingEvent> {
 
   public static final Map<StringStringdefaultConverterMap = new HashMap<StringString>();
   public static final String HEADER_PREFIX = "#logback.classic pattern: ";
   
   static {
 
     .put("date"DateConverter.class.getName());
 
     .put("relative"RelativeTimeConverter.class.getName());
 
     .put("level"LevelConverter.class.getName());
     .put("le"LevelConverter.class.getName());
 
     .put("thread"ThreadConverter.class.getName());
 
     .put("logger"LoggerConverter.class.getName());
 
     .put("message"MessageConverter.class.getName());
 
 
 
 
        .getName());
        .getName());
        .getName());
        .getName());
        .getName());
        .getName());
    .put("nopexception",
    .put("contextName"ContextNameConverter.class.getName());
    
    .put("marker"MarkerConverter.class.getName());
    .put("property"PropertyConverter.class.getName());
  }
  public PatternLayout() {
  }
    return ;
  }
  public String doLayout(ILoggingEvent event) {
    if (!isStarted()) {
      return .;
    }
    return writeLoopOnConverters(event);
  }
    return ;
  }
New to GrepCode? Check out our FAQ X