I am using the "logging" module for my own package, but changing the level from "INFO" to "DEBUG" enables debugging statements from third-party libraries as well. How can I avoid them? Here is the code I am using:
import logging logger = logging.getLogger(__name__) log_file = logging.FileHandler("activity.log", mode='w') log_file.setFormatter(logging.Formatter(fmt='%(levelname)s: %(message)s')) logger.addHandler(log_file) logging.basicConfig(level=logging.INFO) # or DEBUG Thank you. -- https://mail.python.org/mailman/listinfo/python-list