def _get_logger(name, setting_name):
    if name not in _get_logger.loggers:
        logger = logging.getLogger(name)
        if getattr(settings, setting_name, ''):
            try:
                handler = handlers.RotatingFileHandler(
                    getattr(settings, setting_name),
                    'a',
                    settings.LOGGING_MAX_FILE_SIZE,
                    settings.LOGGING_MAX_FILES_COUNT
                )
            except:
                handler = logging.StreamHandler(None)
            handler.setFormatter(logging.Formatter(settings.LOGGING_FORMAT))
            logger.addHandler(handler)
        _get_logger.loggers[name] = logger

    return _get_logger.loggers[name]
Returns a named logger.
dataset/ETHPy150Open isagalaev/django_errorlog/django_errorlog/models.py/_get_logger