Fix Login class logging per class setting, fix per class getter

Add a new helper function to get current class that called the debug function.
Fix bug were log_per was not set correctly
Change all get_class calls in debug to the new helper function
This commit is contained in:
Clemens Schwaighofer
2021-06-15 18:06:21 +09:00
parent 3035287b5c
commit b628331a9b
4 changed files with 35 additions and 19 deletions

View File

@@ -16,15 +16,6 @@ if (defined('BASE')) {
DEFINE('CURRENT_WORKING_DIR', str_replace('lib', '', __DIR__));
}
// METHOD: MyErrorHandler
// PARAMS: $type: the error code from PHP
// $message: the error message from php
// $file: in which file the error happend. this is the source file (eg include)
// $line: in which line the error happened
// $context: array with all the variable
// RETURN: true, so cought errors do not get processed by the PHP error engine
// DESC: will catch any error except E_ERROR and try to write them to the log file in log/php_error-<DAY>.llog
// if this fails, it will print the data to the window via echo
/**
* will catch any error except E_ERROR and try to write them to the log file
* in log/php_error-<DAY>.log