I have implemented Logging
of python into several Flask projects successfully. But when I tried to re-implement Logging in a project it gives the following error:IOError: [Errno 13] Permission denied
.
To try to solve the problem I created the file and still the error continues. It is strange that this error occurs after using the same code for all previous projects.
The error is supposed to occur in the following code:
if __name__ == '__main__':
import logging
logging.basicConfig(filename='error.log', level=logging.WARNING)
app.run()