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

Reduce Redundant Logging and Utilize Return Values for Error Reporting #215

Open
msk opened this issue Feb 9, 2024 · 0 comments
Open

Reduce Redundant Logging and Utilize Return Values for Error Reporting #215

msk opened this issue Feb 9, 2024 · 0 comments
Labels
refactor Code refactoring

Comments

@msk
Copy link
Contributor

msk commented Feb 9, 2024

review-database extensively uses the tracing crate for logging various messages during its operation. While logging is crucial for debugging and monitoring the library's behavior, a significant portion of these log messages appear to be redundant. These messages do not offer additional insights beyond what the caller of the library already knows. This not only clutters the log output but also potentially impacts the performance and readability of the logs.

To improve the usability and efficiency of the review-database library, we propose a two-fold enhancement:

  1. Reduce Redundant Logging: Review and minimize the use of log messages that do not contribute meaningful information to the library users. This includes evaluating the necessity of each log message and determining if it provides value to the debugging process or end-user monitoring.

  2. Utilize Return Values for Error Reporting: Instead of relying predominantly on log messages for error reporting, we suggest modifying the library's functions to report errors and significant events through return values. This approach will empower the library callers to decide how they wish to handle errors or report them, including the option to log these errors based on their specific needs or preferences.

@msk msk added the refactor Code refactoring label Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code refactoring
Projects
None yet
Development

No branches or pull requests

1 participant