Logging class update with dedicated print arrray wrapper

add a prAr that is a new wrapper around print_r, but it does not use
<pre> for layout formatting but {##HTMLPRE##} which will be removed for log
file write or replace with <pre> if printed to the web page
This commit is contained in:
Clemens Schwaighofer
2021-06-16 14:42:52 +09:00
parent d068aaeed7
commit f04487d553
4 changed files with 41 additions and 14 deletions

View File

@@ -86,6 +86,7 @@ class TestR extends TestL
print "** GETCALLERCLASS(INSIDE EXTND CLASS): ".\CoreLibs\Debug\Support::getCallerClass()."<br>";
$this->log->debug('TESTR', 'Logging in class testR (extends testL)');
$this->test('TESTR INSIDE');
$this->log->debug('TESTR', 'Array: '.$this->log->prAr(['a', 'b']).', Other: '.$this->log->prAr(['a', 'b']));
return true;
}
}
@@ -109,7 +110,7 @@ print "S::FDEBUG: ".FileWriter::fdebug('CLASS TEST DEBUG FILE: '.date('Y-m-d H:i
// future DEPRECATED
// $basic->debug('BASIC CLASS', 'Debug test');
$basic->log->debug('BASIC CLASS', 'Debug test');
print "BASIC:<br>".$basic->log->printErrorMsg();
print "BASIC PRINTERRORMSG:<br>".$basic->log->printErrorMsg();
print "</body></html>";