001/** 002 * Logback: the reliable, generic, fast and flexible logging framework. 003 * Copyright (C) 1999-2015, QOS.ch. All rights reserved. 004 * 005 * This program and the accompanying materials are dual-licensed under 006 * either the terms of the Eclipse Public License v1.0 as published by 007 * the Eclipse Foundation 008 * 009 * or (per the licensee's choosing) 010 * 011 * under the terms of the GNU Lesser General Public License version 2.1 012 * as published by the Free Software Foundation. 013 */ 014// Contributors: Dan MacDonald <dan@redknee.com> 015package ch.qos.logback.access.net; 016 017import ch.qos.logback.access.spi.IAccessEvent; 018import ch.qos.logback.core.net.AbstractSocketAppender; 019import ch.qos.logback.core.spi.PreSerializationTransformer; 020 021/** 022 * Sends {@link IAccessEvent} objects to a remote a log server, usually a 023 * {@link SocketNode}. 024 * 025 * For more information about this appender, please refer to the online manual 026 * at http://logback.qos.ch/manual/appenders.html#AccessSocketAppender 027 * 028 * @author Ceki Gülcü 029 * @author Sébastien Pennec 030 * 031 */ 032 033public class SocketAppender extends AbstractSocketAppender<IAccessEvent> { 034 035 PreSerializationTransformer<IAccessEvent> pst = new AccessEventPreSerializationTransformer(); 036 037 public SocketAppender() { 038 } 039 040 @Override 041 protected void postProcessEvent(IAccessEvent event) { 042 event.prepareForDeferredProcessing(); 043 } 044 045 public PreSerializationTransformer<IAccessEvent> getPST() { 046 return pst; 047 } 048}