2
0
Fork
You've already forked taskcollect
3

Logging: Bug fix and updates to documentation #74

Merged
kvo merged 2 commits from rayokamoto/taskcollect:tests into main 2023年01月22日 15:11:53 +01:00
Contributor
Copy link

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.
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.
This commit resolves this issue 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.
kvo referenced this pull request from a commit 2023年01月22日 15:12:01 +01:00
kvo referenced this pull request from a commit 2024年06月10日 13:33:54 +02:00
kvo referenced this pull request from a commit 2024年10月05日 16:12:05 +02:00
kvo referenced this pull request from a commit 2025年07月27日 12:40:53 +02:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvo/taskcollect!74
Reference in a new issue
kvo/taskcollect
No description provided.
Delete branch "rayokamoto/taskcollect:tests"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?