Improve logging reliability and fix export consistency issues #35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This pull request addresses several issues related to logging reliability and export inconsistencies. The changes focus on ensuring that errors are logged appropriately and that the exported members are correctly named for consistent usage.
Key Changes
Fixes
writeErrorLog
function to include a promise chain that ensures logging completes before the function exits. This prevents any race conditions and ensures that error logs are reliably recorded before the error is handled.process.std*.write
with theutils.logger
methods in thevalidateYTURL
function. This change improves logging control and makes the logging process more reliable and consistent with the rest of the codebase.index
module to ensure they match the intended export names. This resolves an issue that has persisted since change AddVERSION_INFO
constant for more structured version information #33, and we apologize for any inconvenience this may have caused.Summary
These fixes are essential for maintaining the stability and reliability of the
ytmp3
module, particularly in error handling and logging processes.