Support application specific error handler/logger
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 31.3k
- Forks
- 4.8k
- PR merge metrics
- No merged PRs in 30d
Description
Request
when I integrate jsPDF in another application, it should be possible to connect it with the application's error message / logging approach.
Proposed solution
-
Logging is handled by a logger object
-
logger object is a read/write property of the jspdf instance
-
there is a default logger object which writes to the console
-
the logger object has the methods message, error, warning, info, debug. Maybe we implement the api defined as http://log4javascript.org/
- warning is used for situation where jspdf can work around (e.g. by proper defaults) deprecation messages would be warnings
- error is used for serious issues such as wrong parameters etc.
- info may be used for informational message (e.d. to expose the jspdf version) - probably not applicable for jspdf
- debug is used to write internal information for debugging purposes
- message is used to give messages to the user - probably not applicable for jspdf
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 by locating jsPDF's current error, warning, and console logging paths; no files or tests are identified in the issue. Define the logger object's message, error, warning, info, and debug methods, its default console-backed behavior, and the read/write instance property, then verify existing logging still works through the selected logger.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100