The handler ( StreamHandler ) was not configured before import. Thus, the registration commands in the imported modules do not produce any output. Some processors print files, others over the network, and some on the console. It is not possible for the log instructions inside the imported modules to know what to do without adding handler (s) to the logger.
If the logging operators in the modules are inside the class or function, as in the example to which you are attached, the output can be seen, because by the time the class of the module or function appeared, the handler was added to the registrar.
source share