I have a python console script, which source I don't want to modify.
But I want to modify the logging which is done by the script and its libraries.
Examples:
- I want messages at level ERROR to be mailed to foo@example.com
- I want INFO messages of file foo.py to be ignored.
- I want to include the PID in the loggings messages.
The script uses this logger:
import logging
logger=logging.getLogger(__name__)
del(logging)
How can I configure the logging, if I don't want to modify the sources of the console script?