tomcat icon indicating copy to clipboard operation
tomcat copied to clipboard

JsonAccessLogValve: Add valve for structured logging

Open thomasmey opened this issue 3 years ago • 0 comments

Hi,

this adds a AccessLogValve which logs to stderr in JSON format.

sadly the existing code is very entagled in this regards, that the AccessLogElement does cover two functions: formatting and value fetching.

I tricked the existing code to output JSON by try to re-use most existing code/functions. The result doesn't look to bad, but I'm happy to receive some feedback.

I also left in some comments for questions and ideas that came to my mind while coding.

Happy to hear your feedback.

thomasmey avatar Aug 14 '22 08:08 thomasmey