1 /**
2 * Logback: the reliable, generic, fast and flexible logging framework.
3 * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
4 *
5 * This program and the accompanying materials are dual-licensed under
6 * either the terms of the Eclipse Public License v1.0 as published by
7 * the Eclipse Foundation
8 *
9 * or (per the licensee's choosing)
10 *
11 * under the terms of the GNU Lesser General Public License version 2.1
12 * as published by the Free Software Foundation.
13 */
14 package ch.qos.logback.access.common.sift;
15
16 import ch.qos.logback.access.common.spi.IAccessEvent;
17 import ch.qos.logback.core.joran.spi.DefaultClass;
18 import ch.qos.logback.core.sift.Discriminator;
19 import ch.qos.logback.core.sift.SiftingAppenderBase;
20
21 /**
22 * This appender can contain other appenders which it can build dynamically
23 * depending on MDC values. The built appender is specified as part of a
24 * configuration file.
25 *
26 * <p>See the logback manual for further details.
27 *
28 *
29 * @author Ceki Gulcu
30 */
31 public class SiftingAppender extends SiftingAppenderBase<IAccessEvent> {
32
33 @Override
34 public void start() {
35 super.start();
36 }
37
38 @Override
39 protected long getTimestamp(IAccessEvent event) {
40 return event.getTimeStamp();
41 }
42
43 @Override
44 protected boolean eventMarksEndOfLife(IAccessEvent event) {
45 return false;
46 }
47
48 @Override
49 @DefaultClass(AccessEventDiscriminator.class)
50 public void setDiscriminator(Discriminator<IAccessEvent> discriminator) {
51 super.setDiscriminator(discriminator);
52 }
53 }