logging.basicConfig()
logging.basicConfig() is a Python function in the Logging Module category. Configures the root logger with a basic configuration. The syntax is logging.basicConfig(*, filename=None, filemode="a", format=None, datefmt=None, level=None, stream=None, style="%", handlers=None). Parameters: level, format, filename, etc.. Returns: None. A typical example: import logging
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
logging.info("Server started"). A close sibling is logging.getLogger(), which returns a logger with the specified name or the root logger if name is None. A close sibling is logger.debug(), which logs a message with severity DEBUG (detailed diagnostic info). A close sibling is logger.info(), which logs a message with severity INFO (general operational messages). A close sibling is logger.warning(), which logs a message with severity WARNING (potential issue). More about this category: Logging facility — basicConfig, getLogger, FileHandler, Formatter. For a broader walkthrough, read the Logging Module guide. Related Logging Module entries: logging.getLogger(), logger.debug(), logger.info(), logger.warning(), logger.error(), logger.critical().