or series of names separated by periods (for example 'appor 'app net'if you omit lognameyou will get the logger object associated with the root logger the creation of logger instances is different than what you find in most other library modules when you create loggeryou always give it name which is passed to getlogger(as the logname parameter internallygetlogger(keeps cache of the logger instances along with their associated names if another part of the program requests logger with the same namethe previously created instance is returned this arrangement greatly simplifies the handling of log messages in large applications because you don' have to figure out how to pass logger instances around between different program modules insteadin each module where you want loggingyou just use getlogger(to get reference to the appropriate logger object picking names for reasons that will become clear lateryou should always pick meaningful names when using getlogger(for exampleif your application is called 'app'then you should minimally use getlogger('app'at the top of every program module that makes up the application for exampleimport logging log logging getlogger('app'you might also consider adding the module name to the logger such as getlogger('app net'or getlogger('app user'in order to more clearly indicate the source of log messages this can be done using statements such as thisimport logging log logging getlogger('app '+ _name_ _adding the module name makes it easier to selectively turn off or reconfigure the logging for specific program modules as will be described later issuing log messages if log is an instance of logger object (created using the getlogger(function in the previous section)the following methods are used to issue log messages at the different logging levelslogging level method critical error warning info debug log critical(fmt [*args [exc_info [extra]]]log error(fmt [*args [exc_info [extra]]]log warning(fmt [*args [exc_info [extra]]]log info(fmt [*args [exc_info [extra]]]log debug(fmt [*args [exc_info [extra]]]the fmt argument is format string that specifies the format of the log message any remaining arguments in args serve as arguments for format specifiers in the format string the string formatting operator is used to form the resulting message from these arguments if multiple arguments are providedthey are placed into tuple for formatting if single argument is providedit is placed directly after the when formatting lib fl ff