|
42 | 42 | import javax.net.ssl.SSLSocket; |
43 | 43 | import javax.net.ssl.SSLSocketFactory; |
44 | 44 |
|
45 | | -import net.logstash.logback.Logback11Support; |
46 | 45 | import net.logstash.logback.appender.destination.DelegateDestinationConnectionStrategy; |
47 | 46 | import net.logstash.logback.appender.destination.DestinationConnectionStrategy; |
48 | 47 | import net.logstash.logback.appender.destination.DestinationParser; |
@@ -595,11 +594,7 @@ private void writeEvent(Socket socket, OutputStream outputStream, LogEvent<Event |
595 | 594 | * This is a standard (non-keepAlive) event. |
596 | 595 | * Therefore, we need to send the event. |
597 | 596 | */ |
598 | | - if (getLogback11Support().isLogback11OrBefore()) { |
599 | | - getLogback11Support().doEncode(encoder, logEvent.event); |
600 | | - } else { |
601 | | - outputStream.write(encoder.encode(logEvent.event)); |
602 | | - } |
| 597 | + outputStream.write(encoder.encode(logEvent.event)); |
603 | 598 | } else if (hasKeepAliveDurationElapsed(lastSendEndNanoTime, startNanoTime)){ |
604 | 599 | /* |
605 | 600 | * This is a keep alive event, and the keepAliveDuration has passed, |
@@ -731,10 +726,6 @@ private synchronized void openSocket() { |
731 | 726 | ? new BufferedOutputStream(tempSocket.getOutputStream(), writeBufferSize) |
732 | 727 | : tempSocket.getOutputStream(); |
733 | 728 |
|
734 | | - if (getLogback11Support().isLogback11OrBefore()) { |
735 | | - getLogback11Support().init(encoder, tempOutputStream); |
736 | | - } |
737 | | - |
738 | 729 | addInfo(peerId + "connection established."); |
739 | 730 |
|
740 | 731 | this.socket = tempSocket; |
@@ -798,14 +789,6 @@ private synchronized void closeSocket() { |
798 | 789 | } |
799 | 790 |
|
800 | 791 | private void closeEncoder() { |
801 | | - if (getLogback11Support().isLogback11OrBefore()) { |
802 | | - try { |
803 | | - getLogback11Support().close(encoder); |
804 | | - } catch (IOException ioe) { |
805 | | - addError("Failed to close encoder", ioe); |
806 | | - } |
807 | | - } |
808 | | - |
809 | 792 | encoder.stop(); |
810 | 793 | } |
811 | 794 |
|
@@ -1057,13 +1040,6 @@ protected void fireConnectionFailed(InetSocketAddress address, Throwable throwab |
1057 | 1040 | } |
1058 | 1041 |
|
1059 | 1042 |
|
1060 | | - /* |
1061 | | - * Visible for unit testing |
1062 | | - */ |
1063 | | - protected Logback11Support getLogback11Support() { |
1064 | | - return Logback11Support.INSTANCE; |
1065 | | - } |
1066 | | - |
1067 | 1043 | public Encoder<Event> getEncoder() { |
1068 | 1044 | return encoder; |
1069 | 1045 | } |
|
0 commit comments