添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
All Implemented Interfaces:
ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent> , ch.qos.logback.core.net.SocketConnector.ExceptionHandler , ch.qos.logback.core.spi.ContextAware , ch.qos.logback.core.spi.FilterAttachable<ch.qos.logback.classic.spi.ILoggingEvent> , ch.qos.logback.core.spi.LifeCycle , Runnable
public class TcpAppender
extends ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
implements Runnable, ch.qos.logback.core.net.SocketConnector.ExceptionHandler
Logback Appender which writes its events to a TCP port. This class is based on the logic of Logback's SocketAppender, but does not try to serialize Java objects for deserialization and logging elsewhere.
setEventDelayLimit ​(ch.qos.logback.core.util.Duration eventDelayLimit)
The eventDelayLimit takes a non-negative integer representing the number of milliseconds to allow the appender to block if the underlying BlockingQueue is full.
setLayout ​(ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent> layout) setPort ​(int port) setQueueSize ​(int queueSize) setReconnectionDelay ​(int reconnectionDelay) setRemoteHost ​( String host) start () stop ()

connectionFailed

public void connectionFailed​(ch.qos.logback.core.net.SocketConnector socketConnector,
                             Exception e)
Specified by:
connectionFailed in interface ch.qos.logback.core.net.SocketConnector.ExceptionHandler

setEventDelayLimit

public void setEventDelayLimit​(ch.qos.logback.core.util.Duration eventDelayLimit)
The eventDelayLimit takes a non-negative integer representing the number of milliseconds to allow the appender to block if the underlying BlockingQueue is full. Once this limit is reached, the event is dropped.
Parameters:
eventDelayLimit - the event delay limit