Open tituschu0628 opened 1 year ago
i dont think this should be a config setting, changing the log level seems fine. do you need to configure this separately from other DEBUG-level messages of io.micronaut.http.server.RouteExecutor? we could add a marker or something.
for our case, we do want to stay at INFO over time, our logs started to become too chatty and we decided to change many of our log messages from INFO to DEBUG to clean up clutter changing level to DEBUG would defeat that
if we don't care to use createDefaultErrorResponse
anymore, then yes I don't have to worry about isIgnorable
and just log.error everything, but it means we won't use RouteExecutor
's default behavior
you can change the log level for individual classes. you dont need to log DEBUG level everywhere.
i see i see, thanks for the suggestions
i'll take a look at the whole RouteExecutor
class first
Feature description
Hello,
We current set our micronaut logging level to INFO. The RouteExecutor decides to log connection related exceptions (regex
IGNORABLE_ERROR_MESSAGE
) to DEBUG. I understand the intention to reduce the amount of logs (https://github.com/micronaut-projects/micronaut-core/issues/5224) but what if I want to see these errors without changing logging level? The 2 possible solutions I have is: 1 extend theErrorResponseProcessor
2 implement aExceptionHandler<Throwable, HttpResponse<?>>
in either of these I then check the exception withisIgnorable()
which I copy fromRouteExecutor
, and print them to ERROR/WARN if its ignoredIs there no simplier way to achieve this? A configuration or toggle that override
isIgnorable
or log to another level would be nice. I wish I didn't have to create classes just to change behavior of 1 line (logException(cause);
increateDefaultErrorResponse()