diff --git a/www/admin/class_test.debug.php b/www/admin/class_test.debug.php
index 9cc712bc..f07f5df8 100644
--- a/www/admin/class_test.debug.php
+++ b/www/admin/class_test.debug.php
@@ -3,11 +3,12 @@
* @phan-file-suppress PhanTypeSuspiciousStringExpression
*/
-$DEBUG_ALL_OVERRIDE = 0; // set to 1 to debug on live/remote server locations
-$DEBUG_ALL = 1;
-$PRINT_ALL = 0;
+// all the settings are overruled by config
+$DEBUG_ALL_OVERRIDE = true; // set to 1 to debug on live/remote server locations
+$DEBUG_ALL = true;
+$PRINT_ALL = false;
$ECHO_ALL = true;
-$DB_DEBUG = 1;
+$DB_DEBUG = true;
if ($DEBUG_ALL) {
error_reporting(E_ALL | E_STRICT | E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR);
@@ -26,7 +27,7 @@ if (!defined('SET_SESSION_NAME')) {
// define log file id
$LOG_FILE_ID = 'classTest-debug';
ob_end_flush();
-
+// override ECHO ALL FALSE
$ECHO_ALL = true;
use CoreLibs\Debug\Support as DebugSupport;
@@ -53,7 +54,10 @@ print "V-S::PRINTAR: ".$debug_support_class::printAr(['Foo', 'Bar'])."
";
// debug
print "C->DEBUG: ".$debug->debug('CLASS-TEST-DEBUG', 'Class Test Debug')."
";
+print "C->DEBUG(html): ".$debug->debug('CLASS-TEST-DEBUG', 'HTML TAG
BOLD')."
";
+print "C->DEBUG(html,strip): ".$debug->debug('CLASS-TEST-DEBUG', 'HTML TAG
BOLD', true)."
";
print "C->PRINTERRORMSG:
".$debug->printErrorMsg()."
";
+echo "CLASS DEBUG CALL
";
class TestL
{
@@ -62,15 +66,40 @@ class TestL
{
$this->log = new CoreLibs\Debug\Logging();
}
- public function test()
+ public function test(string $ts = null)
{
- $this->log->debug('TESTL', 'Logging in class testL');
- print "IN TestL->test:
".$this->log->printErrorMsg()."
";
+ print "* GETCALLERCLASS(INSIDE CLASS): ".\CoreLibs\Debug\Support::getCallerClass()."
";
+ $this->log->debug('TESTL', 'Logging in class testL'.($ts !== null ? ': '.$ts : ''));
+ $this->log->debug('TESTL', 'Some other message');
+ return true;
+ }
+}
+class TestR extends TestL
+{
+ public $foo;
+ public function __construct()
+ {
+ parent::__construct();
+ }
+ public function subTest()
+ {
+ print "** GETCALLERCLASS(INSIDE EXTND CLASS): ".\CoreLibs\Debug\Support::getCallerClass()."
";
+ $this->log->debug('TESTR', 'Logging in class testR (extends testL)');
+ $this->test('TESTR INSIDE');
return true;
}
}
$tl = new TestL();
-print "CLASS SUB: DEBUG: ".$tl->test()."
";
+print "CLASS: LOG ECHO: ".(string)$tl->log->getLogLevelAll('echo')."
";
+print "CLASS: DEBUG: ".$tl->test()."
";
+print "CLASS: PRINTERRORMSG:
".$tl->log->printErrorMsg()."
";
+$tr = new TestR();
+print "CLASS: LOG ECHO: ".(string)$tr->log->getLogLevelAll('echo')."
";
+print "CLASS EXTEND: DEBUG/tl: ".$tr->test('TESTR OUTSIDE')."
";
+print "CLASS EXTEND: DEBUG/tr: ".$tr->subTest()."
";
+print "CLASS EXTEND: PRINTERRORMSG:
".$tr->log->printErrorMsg()."
";
+
+print "GETCALLERCLASS(NON CLASS): ".\CoreLibs\Debug\Support::getCallerClass()."
";
// fdebug
print "S::FSETFILENAME: ".FileWriter::fsetFilename('class_test_debug_file.log')."
";
@@ -78,7 +107,8 @@ print "S::FDEBUG: ".FileWriter::fdebug('CLASS TEST DEBUG FILE: '.date('Y-m-d H:i
// error message
// future DEPRECATED
-$basic->debug('BASIC CLASS', 'Debug test');
+// $basic->debug('BASIC CLASS', 'Debug test');
+$basic->log->debug('BASIC CLASS', 'Debug test');
print "BASIC:
".$basic->log->printErrorMsg();
print "