When using logback access in tomcat and the transfer encoding is chunked, logback appends "-" as byte count field.
This is because method response.getContentLength() is used. Instead response.getBytesWritten(false); should be used.
Reference implementation from tomcat's Valve: https://github.com/apache/tomcat/blob/1ca4a95822197bbad8c6faaa7616af9137fdf50a/java/org/apache/catalina/valves/AbstractAccessLogValve.java#L1165
|