How come logging.error writes to a file, but not logging.debug or logging.info?

dcwhatthe at gmail.com dcwhatthe at gmail.com
Thu Mar 26 17:02:06 EDT 2020


Hi,


When we run


    logging.basicConfig( filename = "TestLogging_" +  datetime.datetime.now().strftime("%Y%m%d_%H%M%S") + ".log" )

                        
, and then

    logging.error( "Test01\n" )
    logging.debug("Test02\n")
    logging.info("Test03\n")
    logging.error( "Test04\n" )


, only the error log lines get sent to the file.  


How do I get info() and debug() to go to the file, as well?





More information about the Python-list mailing list