Apache Combined Log Format output
Opened this issue · 4 comments
It would be really slick if Hammock could produce NCSA/Apache Common Log Format and/or Combined Log Format for its web-spi
-using modules via log4j.
Jetty, for example, supports common & combined log formats thusly:
https://stackoverflow.com/questions/19458875/how-do-i-configure-embedded-jetty-server-to-log-all-requests
What if, I can look for a bean of type RequestLog
and set that on the jetty instance? I'm not sure there's an equivalent for undertow. Or maybe I don't get what you're saying quite yet.
Or if there's a way to log generically for all web-spi
users where the system administrator has an easy way to define access_log and error_log files in the style of an old school Apache HTTP Server.
Like something webalizer or awstats could parse.
Oh ok, I see what you want to do now. I know how to do this in undertow, and you've linked to how to do it in jetty. Need to see how tomcat does it. But should be doable.
The way this answer shows a log4j wrapper might be a neat way to go about it: https://stackoverflow.com/a/38783338