View Javadoc

1   /**
2    * Logback: the generic, reliable, fast and flexible logging framework.
3    * 
4    * Copyright (C) 2000-2008, QOS.ch
5    * 
6    * This library is free software, you can redistribute it and/or modify it under
7    * the terms of the GNU Lesser General Public License as published by the Free
8    * Software Foundation.
9    */
10  package ch.qos.logback.classic.sift;
11  
12  import java.util.List;
13  
14  import ch.qos.logback.classic.spi.LoggingEvent;
15  import ch.qos.logback.core.Context;
16  import ch.qos.logback.core.joran.event.SaxEvent;
17  import ch.qos.logback.core.sift.AppenderFactoryBase;
18  import ch.qos.logback.core.sift.SiftingJoranConfiguratorBase;
19  
20  public class AppenderFactory extends AppenderFactoryBase<LoggingEvent>{
21  
22    String mdcKey;
23    
24    AppenderFactory(Context context, List<SaxEvent> eventList, String mdcKey) {
25        super(context, eventList);
26        this.mdcKey = mdcKey;
27    }
28  
29    public SiftingJoranConfiguratorBase<LoggingEvent> getSiftingJoranConfigurator(String k) {
30      return new SiftingJoranConfigurator(mdcKey, k);
31    }
32  
33  }