简体   繁体   中英

How do I configure embedded Jetty server to print NCSARequestLog to STDOUT

I have an embedded Jetty server running on Heroku, and I want it to print request logs to STDOUT so I can capture device, IP, etc data.

I can see how to configure NCSARequestLog to log to a file , but I can't find any way to redirect that to STDOUT.

How can I log request information from an embedded Jetty server to STDOUT?

The NCSARequestLog does not output to console, and cannot be configured to do that.

However, all is not lost, use the Slf4jRequestLog instead and setup your slf4j log implementation to output those events to your console.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM