When something goes wrong with a program, it is natural to try to diagnose the problem by using the print statement to check the value of variables. As your program grows in size however, this begins to get unwieldy, if only because the output of print ends up in the console and you lose it to the autoscrolling. Python offers another way to record these messages – the logging module. In its most most basic form…
Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends, & analysis