Open osigida opened 9 years ago
I've found out that something set queueSize to 10000, this value will be reused as ringBufferSize. so if I set queueSize: 8192 it works, but still not clear where 10000 comes from
here is the test for the case
@Test
public void testQueueSize() throws Exception {
final LogstashTcpAppenderFactory logstashTcpAppenderFactory = new LogstashTcpAppenderFactory();
Assert.assertEquals(AbstractLogstashTcpSocketAppender.DEFAULT_QUEUE_SIZE, logstashTcpAppenderFactory.getQueueSize());
}
this library is compiled with
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>3.5</version>
</dependency>
which has constant:
public static final int DEFAULT_QUEUE_SIZE = 10000;
see: https://github.com/logstash/logstash-logback-encoder/blob/logstash-logback-encoder-3.5/src/main/java/net/logstash/logback/appender/LogstashTcpSocketAppender.java
I've used logstash-logback-encoder version 4.2, which has this value changed to 8192
however, compiled version of dropwizard-logstash-encoder inlied the value of the constant, so in byte code it has follow values:
@Min(1L)
@Max(65535L)
private int queueSize = 10000;
which make it incompatible with logstash-logback-encoder version 4.2
the fix: set queueSize: 8192
in configuration manually
btw, libraries are outdated in the project, better to bump them up
Hi, I try to use you lib (1.0.2) for logging for DW 0.7.1 but constantly get error. I've configured only host and port, so no any custom configuration provided.
exception looks like:
Thanks a lot, Oleg