In my Python program, I import a module (let's say it's called bananas). The module gets a logger inside its __init__.py by doing this:
_logger = logging.getLogger(__name__). Thus, the logger's name is bananas.
In my program (the one that imports the module bananas), I also have this line: my_logger = logging.getLogger("bananas").
Does this:
- Overwrite
_loggermade inbananas? - Fetch that logger, and thus
my_loggernow equals_logger? - Something else entirely
Thank you for your help!