OK to use Python logging?

Is there any reason not to use Python’s logging module? Will it block Panda code or cause any issues with Pandas own logging features?

Here is my code for setting up logging:

import logging
import logging.handlers

LOG_FILENAME = 'logs/log_file.txt'
myLogger = logging.getLogger("MyLogger")
formatter = logging.Formatter("%(asctime)s - [%(filename)s] - %(message)s")
handler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=1048576, backupCount=5)
myLogger.debug("Starting Panda3D...")

And in each module, I do this to get a handle on my logger:

self.myLogger = logging.getLogger("MyLogger")

panda already gives you a logger:

That said, I don’t know of any reason to avoid using Python’s logger.


I should have specified that I wanted to use some advanced logging features such as controlling the format of the logging statements as well as a rolling log file.