Skip to content

Support application specific error handler/logger #2117

Open
@bwl21

Description

@bwl21

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

  1. Logging is handled by a logger object

  2. logger object is a read/write property of the jspdf instance

  3. there is a default logger object which writes to the console

  4. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions