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.core; 11 12 import ch.qos.logback.core.spi.ContextAware; 13 import ch.qos.logback.core.spi.FilterAttachable; 14 import ch.qos.logback.core.spi.LifeCycle; 15 16 17 public interface Appender<E> extends LifeCycle, ContextAware, FilterAttachable<E> { 18 19 /** 20 * Get the name of this appender. The name uniquely identifies the appender. 21 */ 22 public String getName(); 23 24 /** 25 * This is where an appender accomplishes its work. Note that the argument 26 * is of type Object. 27 * @param event 28 */ 29 void doAppend(E event) throws LogbackException; 30 31 /** 32 * Set the {@link Layout} for this appender. 33 */ 34 public void setLayout(Layout<E> layout); 35 36 /** 37 * Returns this appenders layout. 38 */ 39 public Layout<E> getLayout(); 40 41 /** 42 * Set the name of this appender. The name is used by other components to 43 * identify this appender. 44 * 45 */ 46 public void setName(String name); 47 48 }