Issue Type: Improvement Improvement
Affects Versions: 1.0.10
Assignee: Logback dev list
Components: logback-classic, logback-core
Created: 22/Mar/13 4:46 PM
Description: In SocketAppenderBase.connect, the Socket constructor is invoked directly to create a new socket. This makes it difficult for a subclass to have any influence over the creation of sockets (e.g. to use an SSL socket).

If SocketAppenderBase declared at method such as this:

protected SocketFactory getSocketFactory() {
  return SocketFactory.getDefault()
}

and used it in the connect() implementation...

...
oos = new ObjectOutputStream(getSocketFactory().createSocket(address, port).getOutputStream());
...

then a subclass could override it with, for example, an appropriately configured SSLSocketFactory...

public class MySSLSocketAppender extends SocketAppender {
  ...
  protected SocketFactory getSocketFactory() {
    return mySslContext.getSocketFactory()
  }
  ...
}

Project: logback
Priority: Major Major
Reporter: Carl Harris
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira