logging the logging module provides flexible facility for applications to log eventserrorswarningsand debugging information this information can be collectedfilteredwritten to filessent to the system logand even sent over the network to remote machines this section covers the essential details of using this module for most common cases logging levels the main focus of the logging module concerns the issuing and handling of log messages each message consists of some text along with an associated level that indicates its severity levels have both symbolic name and numerical value as followslevel value description critical error warning info debug notset critical errors/messages errors warning messages informative messages debugging no level set these different levels are the basis for various functions and methods throughout the logging module for examplethere are methods to issue log messages at each level as well as filters that work by blocking messages that don' meet certain threshold value basic configuration before using any other functions in the logging moduleyou should first perform some basic configuration of special object known as the root logger the root logger is responsible for managing the default behavior of log messages including the logging leveloutput destinationmessage formatand other basic details the following function is used for configurationbasicconfig([**kwargs]performs basic configuration of the root logger this function should be called before any other logging calls are made the function accepts number of keyword argumentskeyword argument description filename filemode appends log messages to file with the given filename specifies the mode used to open the file by defaultmode ' (appendis used format string used to produce log messages format string used to output dates and times sets the level of the root logger all log messages with level equal to or above this level will be processed lower-level messages will be silently ignored provides an open file to which log messages are sent the default stream is sys stderr this parameter may not be used simultaneously with the filename parameter format datefmt level stream lib fl ff