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
We have encountered a critical issue with logging. Despite configuring through the ASP .NET Core ILogger abstraction, which we have integrated with NLog to produce JSON-formatted logs, redundant log messages appear directly on the console in a plain-text format. This behavior is problematic for our observability setup and creates significant operational challenges.
Observed Behavior:
Occasionally, log messages like the following appear directly on the console:
%3|1733736806.005|FAIL|rdkafka#consumer-1| [thrd:localhost:19092/bootstrap]: localhost:19092/0: Connect to ipv4#127.0.0.1:19092 failed: Unknown error (after 2032ms in state CONNECT)
%4|1733736807.517|SESSTMOUT|rdkafka#consumer-1| [thrd:main]: Consumer group session timed out (in join-state steady) after 45092 ms without a successful response from the group coordinator (broker -1, last error was Success): revoking assignment and rejoining group
%3|1733736814.215|FAIL|rdkafka#consumer-1| [thrd:localhost:19092/bootstrap]: localhost:19092/0: Connect to ipv6#[::1]:19092 failed: Unknown error (after 2037ms in state CONNECT)
We expect all logs to be routed through our ILogger implementation, where we have strict control over formatting. However, the library redundantly emits these logs directly to the console, bypassing our logging configuration.
We have configured the producer builder using the following approach:
While the SetLogHandler and SetErrorHandler correctly captures and formats the logs, redundant plain-text logs still appear on the console, and there seems to be on way to to suppress them.
Why This Is Critical:
Impact on Observability
We use a sidecar container to capture console logs and forward them to OpenSearch. This sidecar expects logs to be in valid JSON format. When plain-text logs like the above appear, the sidecar crashes due to parsing errors.
Loss of Critical Logs:
If the sidecar crashes, subsequent critical JSON logs are missed, potentially leading to undetected failures in production.
How to reproduce
Set up a local Redpanda instance in Docker.
Run a local application with a Kafka producer configured to connect to the Redpanda instance.
Ensure the producer successfully connects and stars sending messages to Redpanda.
Kill the Redpanda Docker container.
Observer the application logs:
You will see critical error logs captured by the SetLogHandler, SetErrorHandler and routed though ILogger, as expected.
Additionally, the redundant plain-text error logs will appear directly on the console, bypassing ILogger , which is the core issue.
Description
We have encountered a critical issue with logging. Despite configuring through the ASP .NET Core
ILogger
abstraction, which we have integrated with NLog to produce JSON-formatted logs, redundant log messages appear directly on the console in a plain-text format. This behavior is problematic for our observability setup and creates significant operational challenges.Observed Behavior:
Occasionally, log messages like the following appear directly on the console:
We expect all logs to be routed through our
ILogger
implementation, where we have strict control over formatting. However, the library redundantly emits these logs directly to the console, bypassing our logging configuration.We have configured the producer builder using the following approach:
While the
SetLogHandler
andSetErrorHandler
correctly captures and formats the logs, redundant plain-text logs still appear on the console, and there seems to be on way to to suppress them.Why This Is Critical:
How to reproduce
SetLogHandler
,SetErrorHandler
and routed thoughILogger
, as expected.ILogger
, which is the core issue.Client configuration
Checklist
Please provide the following information:
The text was updated successfully, but these errors were encountered: