import logging
import warnings

warnings.filterwarnings("ignore")

logging.getLogger(
    "great_expectations.datasource.generator.in_memory_generator"
).setLevel(logging.CRITICAL)
logging.getLogger(
    "great_expectations.dataset.sqlalchemy_dataset"
).setLevel(logging.CRITICAL)
logging.getLogger(
    "great_expectations.profile.sample_expectations_dataset_profiler"
).setLevel(logging.CRITICAL)

# Take over the entire GE module logging namespace when running CLI
logger = logging.getLogger("great_expectations")


def _set_up_logger():
    handler = logging.StreamHandler()
    formatter = logging.Formatter("%(message)s")
    handler.setFormatter(formatter)
    logger.addHandler(handler)
    logger.setLevel(logging.WARNING)

import logging
import warnings

warnings.filterwarnings("ignore")


###
# REVIEWER NOTE: THE ORIGINAL IMPLEMENTATION WAS HEAVY HANDED AND I BELIEVE WAS A TEMPORARY WORKAROUND.
# PLEASE CAREFULLY REVIEW TO ENSURE REMOVING THIS DOES NOT AFFECT DESIRED BEHAVIOR
###

def _set_up_logger():
    # Log to console with a simple formatter; used by CLI
    formatter = logging.Formatter("%(message)s")
    handler = logging.StreamHandler()
    handler.setLevel(level=logging.WARNING)
    handler.setFormatter(formatter)
    logger = logging.getLogger("great_expectations")
    logger.addHandler(handler)

Simplify cli_logging configuration