-
Notifications
You must be signed in to change notification settings - Fork 407
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing response headers when using LogstashAccessTcpSocketAppender #69
Comments
This line: Could you possibly dump out a list of your dependencies? It might highlight the issue. |
@neilprosser I am not very well java versed, how would I do that? |
If you use Maven I think you can do |
|
@neilprosser I added the jackson Jars to the lib directory of tomcat and it works now, but isn't this not supposed to happen? |
Now, is there a way to format these logs? I'd like to add user agent and headers. The examples provided don't work and looking at the code it seems to force the log events to one specific format. Is there anyway to override this? |
Ah ok. I didn't realise you were building the encoder for yourself and dropping it into Tomcat rather than adding it as a dependency on your project. If you add it as a dependency and package it up with the artifact you deploy to your container it should pull in all the dependencies it needs (currently the JAR file excludes Logback, SLF4J, Jackson and some Commons libraries to avoid clashes). In terms of headers, I think those examples are based on functionality introduced in the last couple of days and only released on Monday. I'd make sure you're using at least version For formatting, if you want a format other than JSON you would need to write your own |
@neilprosser Well the request headers come in fine, but the response headers don't seem to be there, maybe because that's not how it works? The outline gives an example for request and response headers, so I'd ideally like to include both or format the access log a bit if possible. Is there anyway? I'm fine with the JSON format, I just wanna include more information. |
I'm going ping @philsttr into this conversation and see whether he's got any idea why the response headers are missing. From what I can see your configuration matches the documentation. |
Hi @hntd187, In my testing, I can see the response headers in the output when I set the There is even a unit test for this particular case. It is possible that the logback You can check for this case by temporarily configuring your RollingFileAppender to use the pattern similar to the following: |
Updating the issue title to reflect the current problem. Also, please ensure that you have the following on the classpath:
|
Closing. Please open a new issue if you have any problems with v4.3 |
I've been having this issue, which I can't see to sort out. I've narrowed it down to somewhere in my logback-access.xml, but with no debugging information I have no real idea where to do with this.
This is my file, if I comment the part about tcp socket appender the server starts up fine, but other wise it dies miserably
Does anyone have any insight into what is causing this?
Also my server.xml if that helps
The text was updated successfully, but these errors were encountered: