dealfonso / sapp

Simple and Agnostic PDF Document Parser in PHP - sign PDF docs using PHP
GNU Lesser General Public License v3.0
118 stars 31 forks source link

add the _DEBUG_LEVEL constant to control which debug messages are shown #41

Closed dealfonso closed 1 year ago

dealfonso commented 1 year ago

functions p_debug, p_warning, p_error, p_debug_var were showing messages anytime. Using _DEBUG_LEVEL constant, it is possible to control which messages are shown depending on its value.

Usage: define _DEBUG_LEVEL constant before importing SAPP. e.g.:

define('_DEBUG_LEVEL', 2);
require_once('vendor/autoload.php');
angeljqv commented 1 year ago

@dealfonso normally DEBUG_LEVEL is 1 or 2 by default, why 3? Why always debug mode by default?

dealfonso commented 1 year ago

As it is a library, I find that it is more appropriate to deactivate the debug mode than activating it (at least, for the current state of sapp)

angeljqv commented 1 year ago

@dealfonso please release for packagist