Conversation
|
This is not the way to do this. Look at the ExtendedAccessLogValve. Look at |
697ec09 to
b4eadfb
Compare
|
I added it to both AccessLogValve and ExtendedAccessLogValve because it is non-trivial for users to switch between them as the documentation does not provide a mapping (EG: %v = ?), and the extended valve does not permit arbitrary formatting (EG: JSON log). is that OK? |
|
That looks good for for the I don't like that this is automatically added as a request attribute. Firstly, if we add this field, why not all the others? Secondly, it seems wrong to add this as an attribute when there is a perfectly good API to obtain the ID. I think that means AccessLogValve needs something like |
|
Concerning analogies in Apache httpd land: ErrorLogFormat has and explains them as
See: https://httpd.apache.org/docs/2.4/en/mod/core.html#errorlogformat And as mentioned here, mod_log_config documents: I haven't checked what the connection id in Tomcat land is and how well this analogy applies. Furthermore mod_https provides some IDs via httpd env vars (%{...}e): |
b4eadfb to
563245b
Compare
|
Added %{c}L and x-H(connectionId) to AccessLogValve and ExtendedAccessLogValve to cross reference errors from catalina.log |
|
Manually applied as there were a few things I needed to add/change
|
Add connectionId to the access log options so the connectionId in the error log can be cross referenced to an IP for debug, fail2ban, etc.