def setup_logging(options=None):
    """Configure logging based on options."""
    level = logging.DEBUG if options is not None and options.debug \
        else logging.WARNING
    console = logging.StreamHandler()
    console.setLevel(level)
    formatter = logging.Formatter('%(name)s: %(levelname)-8s %(message)s')
    console.setFormatter(formatter)
    logging.getLogger('parquet').setLevel(level)
    logging.getLogger('parquet').addHandler(console)
def setup_logging ( options = None ) : level = logging . DEBUG if options is not None and options . debug else logging . WARNING console = logging . StreamHandler ( ) console . setLevel ( level ) formatter = logging . Formatter ( '%(name)s: %(levelname)-8s %(message)s' ) console . setFormatter ( formatter ) logging . getLogger ( 'parquet' ) . setLevel ( level ) logging . getLogger ( 'parquet' ) . addHandler ( console )
Configure logging based on options.