Package ch.qos.logback.core.net
Class AbstractSocketAppender<E>
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.AppenderBase<E>
-
- ch.qos.logback.core.net.AbstractSocketAppender<E>
-
- All Implemented Interfaces:
Appender<E>
,SocketConnector.ExceptionHandler
,ContextAware
,FilterAttachable<E>
,LifeCycle
- Direct Known Subclasses:
AbstractSSLSocketAppender
,SocketAppender
@Deprecated(since="2022-01-27") public abstract class AbstractSocketAppender<E> extends AppenderBase<E> implements SocketConnector.ExceptionHandler
Deprecated.An abstract base for module specificSocketAppender
implementations in other logback modules.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_PORT
Deprecated.The default port number of remote logging server (4560).static int
DEFAULT_QUEUE_SIZE
Deprecated.Default size of the deque used to hold logging events that are destined for the remote peer.static int
DEFAULT_RECONNECTION_DELAY
Deprecated.The default reconnection delay (30000 milliseconds or 30 seconds).
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
connectionFailed(SocketConnector connector, java.lang.Exception ex)
Deprecated.Duration
getEventDelayLimit()
Deprecated.Returns the value of the eventDelayLimit property.int
getPort()
Deprecated.Returns value of the Port property.int
getQueueSize()
Deprecated.Returns the value of the queueSize property.Duration
getReconnectionDelay()
Deprecated.Returns value of the reconnectionDelay property.java.lang.String
getRemoteHost()
Deprecated.Returns value of the RemoteHost property.void
setEventDelayLimit(Duration eventDelayLimit)
Deprecated.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)
Deprecated.The Port property takes a positive integer representing the port where the server is waiting for connections.void
setQueueSize(int queueSize)
Deprecated.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)
Deprecated.The reconnectionDelay property takes a positiveDuration
value representing the time to wait between each failed connection attempt to the server.void
setRemoteHost(java.lang.String host)
Deprecated.The RemoteHost property takes the name of of the host where a corresponding server is running.void
start()
Deprecated.void
stop()
Deprecated.-
Methods inherited from class ch.qos.logback.core.AppenderBase
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
-
-
-
Field Detail
-
DEFAULT_PORT
public static final int DEFAULT_PORT
Deprecated.The default port number of remote logging server (4560).- See Also:
- Constant Field Values
-
DEFAULT_RECONNECTION_DELAY
public static final int DEFAULT_RECONNECTION_DELAY
Deprecated.The default reconnection delay (30000 milliseconds or 30 seconds).- See Also:
- Constant Field Values
-
DEFAULT_QUEUE_SIZE
public static final int DEFAULT_QUEUE_SIZE
Deprecated.Default size of the deque used to hold logging events that are destined for the remote peer.- See Also:
- Constant Field Values
-
-
Method Detail
-
start
public void start()
Deprecated.- Specified by:
start
in interfaceLifeCycle
- Overrides:
start
in classAppenderBase<E>
-
stop
public void stop()
Deprecated.- Specified by:
stop
in interfaceLifeCycle
- Overrides:
stop
in classAppenderBase<E>
-
connectionFailed
public void connectionFailed(SocketConnector connector, java.lang.Exception ex)
Deprecated.- Specified by:
connectionFailed
in interfaceSocketConnector.ExceptionHandler
-
setRemoteHost
public void setRemoteHost(java.lang.String host)
Deprecated.The RemoteHost property takes the name of of the host where a corresponding server is running.
-
getRemoteHost
public java.lang.String getRemoteHost()
Deprecated.Returns value of the RemoteHost property.
-
setPort
public void setPort(int port)
Deprecated.The Port property takes a positive integer representing the port where the server is waiting for connections.
-
getPort
public int getPort()
Deprecated.Returns value of the Port property.
-
setReconnectionDelay
public void setReconnectionDelay(Duration delay)
Deprecated.The reconnectionDelay property takes a positiveDuration
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.
-
getReconnectionDelay
public Duration getReconnectionDelay()
Deprecated.Returns value of the reconnectionDelay property.
-
setQueueSize
public void setQueueSize(int queueSize)
Deprecated.The queueSize property takes a non-negative integer representing the number of logging events to retain for delivery to the remote receiver. When the deque size is zero, event delivery to the remote receiver is synchronous. When the deque size is greater than zero, theappend(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.- Parameters:
queueSize
- the deque size to set.
-
getQueueSize
public int getQueueSize()
Deprecated.Returns the value of the queueSize property.
-
setEventDelayLimit
public void setEventDelayLimit(Duration eventDelayLimit)
Deprecated.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
-
getEventDelayLimit
public Duration getEventDelayLimit()
Deprecated.Returns the value of the eventDelayLimit property.
-
-