diff --git a/src/main/java/net/logstash/logback/appender/AbstractLogstashTcpSocketAppender.java b/src/main/java/net/logstash/logback/appender/AbstractLogstashTcpSocketAppender.java index 15e269ef..72f40353 100644 --- a/src/main/java/net/logstash/logback/appender/AbstractLogstashTcpSocketAppender.java +++ b/src/main/java/net/logstash/logback/appender/AbstractLogstashTcpSocketAppender.java @@ -127,16 +127,6 @@ public abstract class AbstractLogstashTcpSocketAppender @@ -908,27 +898,6 @@ public synchronized void start() { addError("No encoder was configured. Use to specify the fully qualified class name of the encoder to use"); } - /* - * Destinations can be configured via / OR but not both! - */ - if (!destinations.isEmpty() && remoteHost != null) { - errorCount++; - addError("Use '/' or '' but not both"); - } - - /* - * Handle destination specified using / - */ - if (remoteHost != null) { - addWarn("/ are DEPRECATED, use instead"); - try { - addDestinations(InetSocketAddress.createUnresolved(remoteHost, port)); - } catch (IllegalArgumentException e) { - errorCount++; - addError(e.getMessage()); - } - } - /* * Make sure at least one destination has been specified */ @@ -1059,36 +1028,6 @@ public void setSocketFactory(SocketFactory socketFactory) { this.socketFactory = socketFactory; } - /** - * The host to which to connect and send events - * - * @deprecated use {@link #addDestination(String)} instead - */ - @Deprecated - public void setRemoteHost(String host) { - remoteHost = host; - } - - @Deprecated - public String getRemoteHost() { - return remoteHost; - } - - /** - * The TCP port on the host to which to connect and send events - * - * @deprecated use {@link #addDestination(String)} instead - */ - @Deprecated - public void setPort(int port) { - this.port = port; - } - - @Deprecated - public int getPort() { - return port; - } - /** * Adds the given destination (or destinations) to the list of potential destinations * to which to send logs. @@ -1096,8 +1035,7 @@ public int getPort() { * * The string is a comma separated list of destinations in the form of hostName[:portNumber]. *

- * If portNumber is not provided, then the configured {@link #port} will be used, - * which defaults to {@value #DEFAULT_PORT} + * If portNumber is not provided, then the default ({@value #DEFAULT_PORT}) will be used *

* * For example, "host1.domain.com,host2.domain.com:5560" diff --git a/src/test/java/net/logstash/logback/appender/LogstashTcpSocketAppenderTest.java b/src/test/java/net/logstash/logback/appender/LogstashTcpSocketAppenderTest.java index 7bab177b..720e6e34 100644 --- a/src/test/java/net/logstash/logback/appender/LogstashTcpSocketAppenderTest.java +++ b/src/test/java/net/logstash/logback/appender/LogstashTcpSocketAppenderTest.java @@ -575,22 +575,6 @@ public void testDestination_None() { Assertions.assertFalse(appender.isStarted()); } - - /** - * Specify destinations using both / and . - * Only one scheme can be used - make sure the appender refuses to start. - */ - @Test - @SuppressWarnings("deprecation") - public void testDestination_MixedType() { - appender.setRemoteHost("localhost"); - appender.setPort(10000); - appender.addDestination("localhost:10001"); - - appender.start(); - Assertions.assertFalse(appender.isStarted()); - } - @Test public void testRoundRobin() throws Exception { appender.addDestination("localhost:10000");