logging in python we can see the effect of each of these statements by printing out each loggerlogger logging getlogger(print('root logger:'loggerlogger logging getlogger('my logger'print('named logger:'logger logger logging getlogger(__name__print('module logger:'logger when the above code is run the output isroot loggernamed loggermodule loggerthis shows that each logger has their own name (the code was run in the main module and thus the module name was __main__and all three loggers have an effective log level of warning (which is the default logger hierarchy there is in fact hierarchy of loggers with the root logger at the top of this hierarchy all named loggers are below the root logger the name of logger can actually be period-separated hierarchical value such as utilutil lib and util lib printer loggers that are further down the hierarchy are children of loggers further up the logger hierarchy for example given logger called libthen it will be below the root logger but above the logger with the name util lib this logger will in turn be above the logger called util lib printer this is illustrated in the following diagram