tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.34k stars 1.68k forks source link

Adds support for different log levels. #374

Open rafagil opened 3 years ago

rafagil commented 3 years ago

Hi! This PR intends to solve the issue #201

This adds different log levels to the lib (WARNING and ERROR):

If WARNING is set, it will show everything, but if ERROR is set, warnings won't be shown in the console.

How to Use

You can set the log level either on the options object or globally using:

domtoimage.impl.options.logLevel = domtoimage.logLevels.ERROR

Possible improvements