如何在Jetty 7中启用响应时间记录 [英] How to enable response time logging in Jetty 7
问题描述
Apache和Tomcat都可以轻松地将响应超时记录到服务器访问日志中(使用%D模式),但是我无法在Jetty中找到任何等效的支持,或者使用默认的NCSARequestLog
或使用logback-access(我首选的日志记录设置).
Apache and Tomcat both make it easy to log response times out to the server access log (with the %D pattern), but I've been unable to find any equivalent support in Jetty, either with the default NCSARequestLog
or using logback-access (my preferred logging setup).
是否有一种方法让Jetty记录这些时间?我可以看到有可能使用某种自定义处理程序来收集此信息并将其提供给日志记录处理程序,但是我希望像StatisticsHandler
这样的事情可以为我做得到,因为它显然已经在跟踪此信息了.生成其汇总统计信息.
Is there a way of getting Jetty to log these times? I could see it being possible to use a custom handler of some kind to gather this information and make it available to the logging handler, but am hopeful that something like the StatisticsHandler
could do it for me as it's clearly already tracking this information to generate its aggregate stats.
推荐答案
在NCSARequestLog
这篇关于如何在Jetty 7中启用响应时间记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!