reactor / reactor-netty

TCP/HTTP/UDP/QUIC client/server with Reactor over Netty
https://projectreactor.io
Apache License 2.0
2.55k stars 637 forks source link

Netty does not provide errorLog just accesLog #3257

Open paulbors opened 3 months ago

paulbors commented 3 months ago

As a system administrator, I would like to see errorLogs in Netty web server similar to those of Apache HTTPD when the client socket is closed and we receive no accessLog.

Motivation

Netty web server does not log web server errors for requests that do not complete (ie: connection terminated is not captured in accessLog which should really be following Apache HTTPD errorLog).

Desired solution

A new ChannelDuplexHandler is added similar to BaseAccessLogHandler and its counterparts but for logging the web server access errors only.

Considered alternatives

One could increase the logs to trace to follow the channel termination exception log events, but that is too verbose for a production environment.

Additional context

Implement a similar errorLogs as those of Apache HTTPD: https://httpd.apache.org/docs/2.4/logs.html#page-header

violetagg commented 3 months ago

@paulbors Are you interested in providing a PR? Which Reactor Netty version should enable this feature (1.1.x or 1.2.x)?