on the other handa missing log message indicates part of the code was skipped and never executed using the logging module to enable the logging module to display log messages on your screen as your program runscopy the following to the top of your program (but under the #python shebang line)import logging logging basicconfig(level=logging debugformat=%(asctime) %(message) '%(levelnameyou don' need to worry too much about how this worksbut basicallywhen python logs an eventit creates logrecord object that holds information about that event the logging module' basicconfig(function lets you specify what details about the logrecord object you want to see and how you want those details displayed say you wrote function to calculate the factorial of number in mathematicsfactorial is or factorial is or , open new file editor tab and enter the following code it has bug in itbut you will also enter several log messages to help yourself figure out what is going wrong save the program as factoriallog py import logging logging basicconfig(level=logging debugformat='%(asctime) %(message) 'logging debug('start of program'%(levelname) def factorial( )logging debug('start of factorial(% %%)( )total for in range( )total * logging debug(' is str( 'total is str(total)logging debug('end of factorial(% %%)( )return total print(factorial( )logging debug('end of program'herewe use the logging debug(function when we want to print log information this debug(function will call basicconfig()and line of information will be printed this information will be in the format we specified in basicconfig(and will include the messages we passed to debug(the print(factorial( )call is part of the original programso the result is displayed even if logging messages are disabled