

def configure_logger(self):
    '\n            Configure output handlers\n        '
    if hasattr(current, 'log'):
        return
    settings = current.deployment_settings
    console = settings.get_log_console()
    logfile = settings.get_log_logfile()
    if ((not console) and (not logfile)):
        self.critical = self.error = self.warning = self.info = self.debug = self.ignore
        return
    logger = logging.getLogger(__name__)
    logger.propagate = False
    logger.setLevel(self.log_level)
    logger.handlers = []
    m_format = '%(asctime)s %(caller)s %(levelname)s: %(message)s'
    d_format = '%Y-%m-%d %H:%M:%S'
    formatter = logging.Formatter(m_format, d_format)
    if console:
        console_handler = logging.StreamHandler(sys.stderr)
        console_handler.setFormatter(formatter)
        console_handler.setLevel(self.log_level)
        logger.addHandler(logfile)
    if logfile:
        from logging.handlers import RotatingFileHandler
        MAXBYTES = 1048576
        logfile_handler = RotatingFileHandler(logfile, maxBytes=MAXBYTES, backupCount=3)
        logfile_handler.setFormatter(formatter)
        logfile_handler.setLevel(self.log_level)
        logger.addHandler(logfile_handler)
    return

dataset/ETHPy150Open sahana/eden/modules/s3log.py S3Log.configure_logger/VarMisuse@175/255 `console_handler`->`logfile`