The module for logging in python is called Logging… It is already present in python by default and does not require additional installations.
There are several types of errors:
From the names of the methods, you can understand what they are.
Their output can be customized in different ways. For example, add the following information in the __init__.py file:
logging…basicConfig(filename=“logs / info.log”, filemode=‘w’, level=logging…INFO, format=‘% (asctime) s | % (message) s’)
logging…basicConfig(filename=“logs / error.log”, filemode=‘w’, level=logging…ERROR)
Then, in those modules and methods where you want to add a logger: