use your own logger to avoid logging info from other package
import logging# Step 1: Set the global logging level to suppress most external logginglogging.basicConfig(level=logging.CRITICAL)# Step 2: Configure your application's logger for detailed logging# Assuming 'my_app' is the name or base path of your application's loggersmy_app_logger = logging.getLogger('my_app')my_app_logger.setLevel(logging.DEBUG)# Or whatever level is appropriate for your app# Set up a console handler (or any other handler) for your application's loggerconsole_handler = logging.StreamHandler()console_handler.setLevel(logging.DEBUG)# Ensure the handler also uses the desired levelformatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')console_handler.setFormatter(formatter)# Add the handler to your application's loggermy_app_logger.addHandler(console_handler)# Example usagemy_app_logger.debug('This debug message will be printed.')my_app_logger.info('This info message will be printed.')