public abstract class AbstractSocketAppender<E> extends AppenderBase<E> implements SocketConnector.ExceptionHandler
SocketAppender
implementations in other logback modules.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT
The default port number of remote logging server (4560).
|
static int |
DEFAULT_QUEUE_SIZE
Default size of the deque used to hold logging events that are destined
for the remote peer.
|
static int |
DEFAULT_RECONNECTION_DELAY
The default reconnection delay (30000 milliseconds or 30 seconds).
|
Modifier and Type | Method and Description |
---|---|
void |
connectionFailed(SocketConnector connector,
java.lang.Exception ex) |
Duration |
getEventDelayLimit()
Returns the value of the eventDelayLimit property.
|
int |
getPort()
Returns value of the Port property.
|
int |
getQueueSize()
Returns the value of the queueSize property.
|
Duration |
getReconnectionDelay()
Returns value of the reconnectionDelay property.
|
java.lang.String |
getRemoteHost()
Returns value of the RemoteHost property.
|
void |
setEventDelayLimit(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.
|
void |
setPort(int port)
The Port property takes a positive integer representing the port
where the server is waiting for connections.
|
void |
setQueueSize(int queueSize)
The queueSize property takes a non-negative integer representing
the number of logging events to retain for delivery to the remote receiver.
|
void |
setReconnectionDelay(Duration delay)
The reconnectionDelay property takes a positive
Duration value
representing the time to wait between each failed connection attempt
to the server. |
void |
setRemoteHost(java.lang.String host)
The RemoteHost property takes the name of of the host where a corresponding server is running.
|
void |
start() |
void |
stop() |
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
public static final int DEFAULT_PORT
public static final int DEFAULT_RECONNECTION_DELAY
public static final int DEFAULT_QUEUE_SIZE
public void start()
start
in interface LifeCycle
start
in class AppenderBase<E>
public void stop()
stop
in interface LifeCycle
stop
in class AppenderBase<E>
public void connectionFailed(SocketConnector connector, java.lang.Exception ex)
connectionFailed
in interface SocketConnector.ExceptionHandler
public void setRemoteHost(java.lang.String host)
public java.lang.String getRemoteHost()
public void setPort(int port)
public int getPort()
public void setReconnectionDelay(Duration delay)
Duration
value
representing the time to wait between each failed connection attempt
to the server. The default value of this option is to 30 seconds.
Setting this option to zero turns off reconnection capability.
public Duration getReconnectionDelay()
public void setQueueSize(int queueSize)
append(Object)
method returns immediately after enqueing the
event, assuming that there is space available in the deque. Using a
non-zero deque length can improve performance by eliminating delays
caused by transient network delays.queueSize
- the deque size to set.public int getQueueSize()
public void setEventDelayLimit(Duration eventDelayLimit)
eventDelayLimit
- the event delay limitpublic Duration getEventDelayLimit()
Copyright © 2010 - 2020 Adobe. All Rights Reserved