dealfonso / sapp

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

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

Closed dealfonso closed 2 years ago

dealfonso commented 2 years 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 2 years ago

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

dealfonso commented 2 years 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 2 years ago

@dealfonso please release for packagist