(logfile)
standard logging configuration useful for development. this should be
    the default argument passed to initialize_logging in settings.py. it should
    be overridden with a different function in localsettings.py when in a
    deployment environment
standard logging configuration useful for development. this should be
    the default argument passed to initialize_logging in settings.py. it should
    be overridden with a different function in localsettings.py when in a
    deployment environment
standard logging configuration useful for development . this should be the default argument passed to initialize_logging in settings . py . it should be overridden with a different function in localsettings . py when in a deployment environment
def default_logging(logfile):
    """standard logging configuration useful for development. this should be
    the default argument passed to initialize_logging in settings.py. it should
    be overridden with a different function in localsettings.py when in a
    deployment environment"""
    root = logging.getLogger()
    root.setLevel(logging.DEBUG)

    handlers = [
        logging.StreamHandler(),
        logging.handlers.RotatingFileHandler(logfile, maxBytes=2**24, backupCount=3),
    ]

    for handler in handlers:
        handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(message)s'))
        root.addHandler(handler)
def default_logging ( logfile ) : root = logging . getLogger ( ) root . setLevel ( logging . DEBUG ) handlers = [ logging . StreamHandler ( ) , logging . handlers . RotatingFileHandler ( logfile , maxBytes = 2 ** 24 , backupCount = 3 ) , ] for handler in handlers : handler . setFormatter ( logging . Formatter ( '%(asctime)s:%(levelname)s:%(message)s' ) ) root . addHandler ( handler )