Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reliable error logging in writeErrorLog function #34

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

mitsuki31
Copy link
Owner

@mitsuki31 mitsuki31 commented Aug 22, 2024

Overview

This pull request addresses the reliability issues with the writeErrorLog function, which was previously experiencing occasional race conditions, leading to inconsistent behavior in logging errors.

Description

Fixed Unreliable Error Logger

  • The writeErrorLog function has been revised to ensure that error logs are written reliably and without race conditions. The function now operates fully asynchronously and is designed to return a boolean value to indicate success (true) or failure (false) in logging the error.

Documentation Update

  • The documentation for the writeErrorLog function has been updated to reflect the changes and provide clearer guidance on its usage.

Summary

This patch ensures that error logs occurred during download process are consistently and accurately written, improving the robustness of the logging system. The function now handles logging in a way that avoids the previous issues, making it a more reliable component of the system.

* Fixed the `writeErrorLog` function to write the log error as expected and without any race conditions
* Made the `writeErrorLog` function to run fully asynchronously and return a boolean value; `true` if succeed on logging error, otherwise `false`
@mitsuki31 mitsuki31 added refactor Refactor and enhancement changes bugfix Fixes any issue and bug patch Patch changes labels Aug 22, 2024
@mitsuki31 mitsuki31 self-assigned this Aug 22, 2024
@mitsuki31 mitsuki31 merged commit 604e4d0 into master Aug 22, 2024
9 checks passed
@mitsuki31 mitsuki31 deleted the fix/reliable-log-error-handling branch August 22, 2024 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes any issue and bug patch Patch changes refactor Refactor and enhancement changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant