Redirect Python 'print' Output to Logger
Redirect Python 'print' Output to Logger: a task in Terminal-Lego-15k (Harbor dataset). You need to create a Python solution that redirects print() output to a Python logger when logging is enabled, without modifying the existing print statements.
The task
You need to create a Python solution that redirects `print()` output to a Python logger when logging is enabled, without modifying the existing print statements.
Part of PrimeIntellect/Terminal-Lego-15k.