Open michaelshum321 opened 1 month ago
UP I need this same fix! I'm having exactly the same problem as described by @michaelshum321.
I make the same suggestion:
Is there a better approach, or could we change the logger to use the module name to be better configurable? thank you :)
Is it possible to implement it? Thanks :)
Typically, it's best practice for Python logging to use
logging.getLogger(__name__)
.However, the ResponseParser simply does
import logging
and thenlogging.info(...)
- this results in the root logger being used, as if the logger waslogging.getLogger("root")
.i.e. https://github.com/aws-samples/amazon-textract-textractor/blob/9df5d268dead3f42104cde2f766cb16be3f93d95/textractor/parsers/response_parser.py#L148
The logs created by the ResponseParser are many and spam our Server Logs. As a result, the only way to filter these logs is to apply a Logging Filter
The Textract Filter works - but is generally not best practice when all I want to do is something like
Is there a better approach, or could we change the logger to use the module
__name__
to be better configurable? thank you :)