Netty does not provide errorLog just accesLog
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
@paulbors Are you interested in providing a PR? Which Reactor Netty version should enable this feature (1.1.x or 1.2.x)?
@violetagg
Hello! I would like to work on this issue. Before proceeding, I have a few questions for clarification.
- Should I approach this by adding an
ErrorLogHandlersimilar toBaseAccessLogHandler? - Should an error log be recorded for all cases where a connection is
disconnectedorclosed, and shouldall exceptionsalso be logged as errors?
If I’ve misunderstood anything or if there’s any additional information you can share, I’d appreciate your guidance! Thank you!
Should I approach this by adding an ErrorLogHandler similar to BaseAccessLogHandler?
@raccoonback I haven't thought about any particular implementation, so we can try adding an ErrorLogHandler similar to BaseAccessLogHandler.
They mention Implement a similar errorLogs as those of Apache HTTPD, can you give me more information about this?
@paulbors Hello! Please explain in more detail.
Implement a similar errorLogs as those of Apache HTTPD: https://httpd.apache.org/docs/2.4/logs.html#page-header
@violetagg
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.
Maybe.. It seems they want to access server-side error logs related to client socket closed and exceptions.
In Apache HTTPD, it appears that a lot of information besides network is logged in ErrorLog...
[Sat Jan 01 00:00:00.000000+0900] [error] [client 192.168.1.100] client denied by server configuration: /export/test
I would like to first define it as follows.
we can just log connection close info and exception info with ErrorLog.
What do you think about this?