1   /**
2    * LOGBack: the reliable, fast and flexible logging library for Java.
3    *
4    * Copyright (C) 1999-2006, QOS.ch
5    *
6    * This library is free software, you can redistribute it and/or
7    * modify it under the terms of the GNU Lesser General Public License as
8    * published by the Free Software Foundation.
9    */
10  package ch.qos.logback.core.pattern.parser;
11  
12  import java.util.HashMap;
13  import java.util.Map;
14  
15  import ch.qos.logback.core.pattern.Converter123;
16  import ch.qos.logback.core.pattern.ConverterHello;
17  import ch.qos.logback.core.pattern.PatternLayoutBase;
18  
19  
20  
21  public class SamplePatternLayout<E> extends PatternLayoutBase<E> {
22  
23    Map<String, String> converterMap = new HashMap<String, String>();
24  
25    public SamplePatternLayout() {
26      converterMap.put("OTT", Converter123.class.getName());
27      converterMap.put("hello", ConverterHello.class.getName());
28    }
29    
30    public  Map<String, String> getDefaultConverterMap() {
31      return converterMap;
32    }
33  
34    public String doLayout(E event) {
35      return writeLoopOnConverters(event);
36    }
37  
38  }