You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are errors that may occur within the WSGIServer runtime that will not be logging to the logger instances defined with NCPA. Though generally not a huge problem for Linux, since these errors will in turn still get logged to STDERR (which nominally will get logged to systemd), which is a large problem for Windows agents, since the application isn't defined to open a console (for good reasons).
The primary issue APPEARS to be that the WSGIServer invocation isn't defining a error_log argument, such that ERROR messages will get passed to NCPA's logger mechanism.
The current invocation is defined as below (for listener):
What should be included is the argument 'error_log=listener_logger' as well.
Per the WSGIserver documentation:
log – If given, an object with a write method to which request (access) logs will be written. If not given, defaults to sys.stderr. You may pass None to disable request logging. You may use a wrapper, around e.g., logging, to support objects that don’t implement a write method. (If you pass a Logger instance, or in general something that provides a log method but not a write method, such a wrapper will automatically be created and it will be logged to at the INFO level.)
error_log – If given, a file-like object with write, writelines and flush methods to which error logs will be written. If not given, defaults to sys.stderr. You may pass None to disable error logging (not recommended). You may use a wrapper, around e.g., logging, to support objects that don’t implement the proper methods. This parameter will become the value for wsgi.errors in the WSGI environment (if not already set). (As with log, wrappers for Logger instances and the like will be created automatically and logged to at the ERROR level.)
My expectation is to get these internal errors messages, this option needs to be added. This is critical to debug items like SSL errors in the Windows agent.
Like changes should be done in other WSGIserver invocations elsewhere in the code.
The text was updated successfully, but these errors were encountered:
There are errors that may occur within the WSGIServer runtime that will not be logging to the logger instances defined with NCPA. Though generally not a huge problem for Linux, since these errors will in turn still get logged to STDERR (which nominally will get logged to systemd), which is a large problem for Windows agents, since the application isn't defined to open a console (for good reasons).
The primary issue APPEARS to be that the WSGIServer invocation isn't defining a error_log argument, such that ERROR messages will get passed to NCPA's logger mechanism.
The current invocation is defined as below (for listener):
WSGIServer(listener=(address, port), application=listener.server.listener, handler_class=WebSocketHandler, log=listener_logger, spawn=Pool(max_connections), **ssl_context)
What should be included is the argument 'error_log=listener_logger' as well.
Per the WSGIserver documentation:
My expectation is to get these internal errors messages, this option needs to be added. This is critical to debug items like SSL errors in the Windows agent.
Like changes should be done in other WSGIserver invocations elsewhere in the code.
The text was updated successfully, but these errors were encountered: