Hi,
I’m using a library that depends on NGettext, and I’m getting a huge amount of Debug/Trace output like:
Translation not found for message id "..."
From reading the source, this comes from:
Trace.WriteLine($"Translation not found for message id "{messageId}".", "NGettext");
Two problems:
This spam happens very frequently in real usage and floods Visual Studio’s Output window.
It’s hard to suppress cleanly because it goes through Trace.WriteLine(message, category) (category = "NGettext"), not through a normal ILogger, and TraceFilter doesn’t reliably filter this overload with the default listener.
Could we add an option to disable these “missing translation” Trace messages (or lower them behind a configurable switch / injected logger), e.g. a static flag, Catalog option, or an event hook?
I’m happy to provide a PR if you can point me to the preferred approach.
Thanks!
Hi,
I’m using a library that depends on NGettext, and I’m getting a huge amount of Debug/Trace output like:
Translation not found for message id "..."
From reading the source, this comes from:
Trace.WriteLine($"Translation not found for message id "{messageId}".", "NGettext");
Two problems:
This spam happens very frequently in real usage and floods Visual Studio’s Output window.
It’s hard to suppress cleanly because it goes through Trace.WriteLine(message, category) (category = "NGettext"), not through a normal ILogger, and TraceFilter doesn’t reliably filter this overload with the default listener.
Could we add an option to disable these “missing translation” Trace messages (or lower them behind a configurable switch / injected logger), e.g. a static flag, Catalog option, or an event hook?
I’m happy to provide a PR if you can point me to the preferred approach.
Thanks!