stuart-warren / logit

"Log It" - Library to extend Log4J 1.2 (plus now Logback 1.0, Java.util.logging and Tomcat 7 AccessLog Valve) by providing json layouts (for logstash) and a zeromq appender (jeromq)
Apache License 2.0
6 stars 1 forks source link

Doesn't work with Tomcat6 - investigate #76

Open stuart-warren opened 10 years ago

stuart-warren commented 10 years ago
INFO: Server startup in 991 ms
logit: Setting property [socketType] to [PUSHPULL].
logit: Setting property [linger] to [1000].
logit: Setting property [sendHWM] to [1000].
logit: Setting property [endpoints] to [tcp://logs.domain.com:2120].
logit: Setting property [bindConnect] to [connect].
logit: ZMQTransport configured.
logit: Trying to resolve hostname. May take some time...
logit: Setting property [hostname] to [ithfog01].
logit: Setting property [username] to [itogr001].
logit: Loading properties file.
logit: Loaded properties file.
logit: Setting property [version] to [0.5.10].
logit: Registered: com.stuartwarren.logit.fields.HttpField
Mar 26, 2014 1:06:15 PM org.apache.jk.server.JkCoyoteHandler invoke
INFO: Error servicing request R( /source/)
java.lang.NoSuchMethodError: org.apache.catalina.connector.Response.getBytesWritten(Z)J
        at com.stuartwarren.logit.tomcatvalve.Layout.doFormat(Layout.java:93)
        at com.stuartwarren.logit.tomcatvalve.Layout.format(Layout.java:62)
        at com.stuartwarren.logit.tomcatvalve.ZmqAppender.append(ZmqAppender.java:88)
        at com.stuartwarren.logit.tomcatvalve.ZmqAppender.log(ZmqAppender.java:48)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:620)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:722)

Mar 26, 2014 1:06:15 PM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Mar 26, 2014 1:06:15 PM org.apache.jk.server.JkCoyoteHandler invoke
INFO: Error servicing request R( /source/)
java.lang.NoSuchMethodError: org.apache.catalina.connector.Response.getBytesWritten(Z)J
        at com.stuartwarren.logit.tomcatvalve.Layout.doFormat(Layout.java:93)
        at com.stuartwarren.logit.tomcatvalve.Layout.format(Layout.java:62)
        at com.stuartwarren.logit.tomcatvalve.ZmqAppender.append(ZmqAppender.java:88)
        at com.stuartwarren.logit.tomcatvalve.ZmqAppender.log(ZmqAppender.java:48)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:620)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:722)

Mar 26, 2014 1:06:15 PM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
stuart-warren commented 10 years ago

May need to use response.getContentCount() or response.getContentCountLong() for tomcat 6...

https://tomcat.apache.org/tomcat-6.0-doc/api/index.html