Bug fix for the logger package:
In the rare occasion that the logs directory is missing, func write()attempted to solve this by tracking the number of times accessing the file failed. Once the number of failures exceeded the limit, logging to a file would be disabled. However, the line that incremented this counter was placed AFTER the error log statement, and the error log statement called write()... leading to a recursive statement.
The issue has been resolved by incrementing beforehand, avoiding the infinite recursion and aborting logging to a file correctly, once the limit is reached.
It should be noted, however, that it would be very rare for the logs directory to be missing as TaskCollect creates the missing directory upon starting up. It would require someone to delete the directory whilst the program is running for such an error to occur.
Updates to IMPLEMENTATION.md
Add more information on the nuances of the different logging levels. Also adds information on logging to a file.
**Bug fix for the logger package:**
In the rare occasion that the logs directory is missing, `func write()`attempted to solve this by tracking the number of times accessing the file failed. Once the number of failures exceeded the limit, logging to a file would be disabled. However, the line that incremented this counter was placed AFTER the error log statement, and the error log statement called write()... leading to a recursive statement.
The issue has been resolved by incrementing beforehand, avoiding the infinite recursion and aborting logging to a file correctly, once the limit is reached.
It should be noted, however, that it would be very rare for the logs directory to be missing as TaskCollect creates the missing directory upon starting up. It would require someone to delete the directory whilst the program is running for such an error to occur.
**Updates to IMPLEMENTATION.md**
Add more information on the nuances of the different logging levels. Also adds information on logging to a file.