remove console.* messages from lib or mask it under a debug mode flag
Open
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 2
- Forks
- 1
- Avg merge
- 8m
- Merged PRs (30d)
- 2
Description
We should not log any error messages from the lib directly as it will lead to too many logs. Eg. https://github.com/aicore/libmysql/blob/main/src/utils/db.js#L285
there are two alternatives:
- Remove all console.error calls, and reject with a {stack and error code}. This will help the receiver decide weather to log it or not.
- Provide a debug flag during init. or a mix of both.
Related to:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the console.error call in src/utils/db.js around line 285 and search the library for other console.* calls. Resolve whether the intended behavior is removal, a debug flag, or both, then verify that library errors expose the stack and error code without directly logging them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mysql
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100