[ https://issues.apache.org/jira/browse/LOG4J2-1708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Gregory updated LOG4J2-1708: --------------------------------- Description: Allow any secure socket Appender to set socket options. At the lowest level, this means that if configured the following {{java.net.Socket}} options are called: - java.net.Socket.setKeepAlive(boolean) - java.net.Socket.setOOBInline(boolean) - java.net.Socket.setPerformancePreferences(int, int, int) - java.net.Socket.setReceiveBufferSize(int) - java.net.Socket.setReuseAddress(boolean) - java.net.Socket.setSendBufferSize(int) - java.net.Socket.setSoLinger(boolean, int) - java.net.Socket.setSoTimeout(int) - java.net.Socket.setTcpNoDelay(boolean) - java.net.Socket.setTrafficClass(int) This will done through a new {{SocketOptions}} XML element (same idea for JSON and YAML). For example: {code:xml} <Configuration status="OFF" name="MyApp"> <Appenders> <Socket name="socket" host="localhost" port="${sys:SecureSocketAppenderSocketOptionsTest.port}" protocol="SSL" ignoreExceptions="false"> <SocketOptions keepAlive="false" receiveBufferSize="10000" reuseAddress="false" rfc1349TrafficClass="IPTOS_LOWCOST" sendBufferSize="8000" soLinger="12345" soTimeout="54321" tcpNoDelay="false"> <SocketPerformancePreferences bandwidth="100" connectionTime="100" latency="100" /> </SocketOptions> <Ssl> <KeyStore location="src/test/resources/org/apache/logging/log4j/core/net/ssl/client.log4j2-keystore.jks" password="changeit" type="JKS" /> <TrustStore location="src/test/resources/org/apache/logging/log4j/core/net/ssl/truststore.jks" password="changeit" type="JKS" /> </Ssl> </Socket> </Appenders> <Loggers> <Root level="debug"> <AppenderRef ref="socket" /> </Root> </Loggers> </Configuration> {code} Another ticket will follow for SSL and Syslog. was: Allow any secure socket Appender to set socket options. At the lowest level, this means that if configured the following {{java.net.Socket}} options are called: - java.net.Socket.setKeepAlive(boolean) - java.net.Socket.setOOBInline(boolean) - java.net.Socket.setPerformancePreferences(int, int, int) - java.net.Socket.setReceiveBufferSize(int) - java.net.Socket.setReuseAddress(boolean) - java.net.Socket.setSendBufferSize(int) - java.net.Socket.setSoLinger(boolean, int) - java.net.Socket.setSoTimeout(int) - java.net.Socket.setTcpNoDelay(boolean) - java.net.Socket.setTrafficClass(int) This will done through a new {{SocketOptions}} XML element (same idea for JSON and YAML). Another ticket will follow for SSL and Syslog. > Allow secure Socket Appender to set socket options > -------------------------------------------------- > > Key: LOG4J2-1708 > URL: https://issues.apache.org/jira/browse/LOG4J2-1708 > Project: Log4j 2 > Issue Type: New Feature > Components: Core > Reporter: Gary Gregory > Assignee: Gary Gregory > Fix For: 2.8 > > > Allow any secure socket Appender to set socket options. > At the lowest level, this means that if configured the following > {{java.net.Socket}} options are called: > - java.net.Socket.setKeepAlive(boolean) > - java.net.Socket.setOOBInline(boolean) > - java.net.Socket.setPerformancePreferences(int, int, int) > - java.net.Socket.setReceiveBufferSize(int) > - java.net.Socket.setReuseAddress(boolean) > - java.net.Socket.setSendBufferSize(int) > - java.net.Socket.setSoLinger(boolean, int) > - java.net.Socket.setSoTimeout(int) > - java.net.Socket.setTcpNoDelay(boolean) > - java.net.Socket.setTrafficClass(int) > This will done through a new {{SocketOptions}} XML element (same idea for > JSON and YAML). > For example: > {code:xml} > <Configuration status="OFF" name="MyApp"> > <Appenders> > <Socket name="socket" host="localhost" > port="${sys:SecureSocketAppenderSocketOptionsTest.port}" protocol="SSL" > ignoreExceptions="false"> > <SocketOptions keepAlive="false" receiveBufferSize="10000" > reuseAddress="false" rfc1349TrafficClass="IPTOS_LOWCOST" > sendBufferSize="8000" soLinger="12345" soTimeout="54321" > tcpNoDelay="false"> > <SocketPerformancePreferences bandwidth="100" connectionTime="100" > latency="100" /> > </SocketOptions> > <Ssl> > <KeyStore > location="src/test/resources/org/apache/logging/log4j/core/net/ssl/client.log4j2-keystore.jks" > password="changeit" type="JKS" /> > <TrustStore > location="src/test/resources/org/apache/logging/log4j/core/net/ssl/truststore.jks" > password="changeit" type="JKS" /> > </Ssl> > </Socket> > </Appenders> > <Loggers> > <Root level="debug"> > <AppenderRef ref="socket" /> > </Root> > </Loggers> > </Configuration> > {code} > Another ticket will follow for SSL and Syslog. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org