You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
297 B

4 years ago
  1. import logging
  2. def _getLogger(name):
  3. """
  4. Retrieve a logger instance. Checks if a handler is defined so we avoid the
  5. 'No handlers could be found' message.
  6. """
  7. logger = logging.getLogger(name)
  8. # if not logging.root.handlers:
  9. # logger.disabled = 1
  10. return logger