Composer update
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
// 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;
|
||||
@@ -32,7 +31,7 @@ $ECHO_ALL = true;
|
||||
use CoreLibs\Debug\Support as DebugSupport;
|
||||
use CoreLibs\Debug\FileWriter;
|
||||
|
||||
$debug = new CoreLibs\Debug\Logging([
|
||||
$debug = new CoreLibs\Debug\LoggingLegacy([
|
||||
'log_folder' => BASE . LOG,
|
||||
'file_id' => $LOG_FILE_ID,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
@@ -40,7 +39,7 @@ $debug = new CoreLibs\Debug\Logging([
|
||||
'echo_all' => $ECHO_ALL,
|
||||
]);
|
||||
$debug_support_class = 'CoreLibs\Debug\Support';
|
||||
$debug_logging_class = 'CoreLibs\Debug\Logging';
|
||||
$debug_logging_class = 'CoreLibs\Debug\LoggingLegacy';
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: DEBUG';
|
||||
print "<!DOCTYPE html>";
|
||||
@@ -72,16 +71,43 @@ function test2(): array
|
||||
print "S::GETCALLERMETHOD: " . DebugSupport::getCallerMethod(0) . "<br>";
|
||||
print "S::GETCALLERMETHOD: " . test() . "<br>";
|
||||
print "S::GETCALLERMETHODLIST: <pre>" . print_r(test2(), true) . "</pre><br>";
|
||||
// printAr
|
||||
print "S::PRINTAR: " . DebugSupport::printAr(['Foo', 'Bar']) . "<br>";
|
||||
print "V-S::PRINTAR: " . $debug_support_class::printAr(['Foo', 'Bar']) . "<br>";
|
||||
// printBool
|
||||
print "S::PRINTBOOL(default): " . DebugSupport::printBool(true) . "<br>";
|
||||
print "S::PRINTBOOL(name): " . DebugSupport::printBool(true, 'Name') . "<br>";
|
||||
print "S::PRINTBOOL(name, ok): " . DebugSupport::printBool(true, 'Name', 'ok') . "<br>";
|
||||
print "S::PRINTBOOL(name, ok, not): " . DebugSupport::printBool(false, 'Name', 'ok', 'not') . "<br>";
|
||||
// debugString
|
||||
print "S::DEBUSTRING(s): " . DebugSupport::debugString('SET') . "<br>";
|
||||
print "S::DEBUSTRING(s): " . DebugSupport::debugString('SET') . "<br>";
|
||||
print "S::DEBUSTRING(s>): " . DebugSupport::debugString('<SET>') . "<br>";
|
||||
print "S::DEBUSTRING(''): " . DebugSupport::debugString('') . "<br>";
|
||||
print "S::DEBUSTRING(,s): " . DebugSupport::debugString(null, '{-}') . "<br>";
|
||||
// dumpVar
|
||||
print "S::DUMPVAR(s): " . DebugSupport::dumpVar('SET') . "<br>";
|
||||
print "S::DUMPVAR(s,true): " . DebugSupport::dumpVar('SET', true) . "<br>";
|
||||
print "S::DUMPVAR(s>): " . DebugSupport::dumpVar('<SET>') . "<br>";
|
||||
print "S::DUMPVAR(s>,true): " . DebugSupport::dumpVar('<SET>', true) . "<br>";
|
||||
print "S::DUMPVAR(''): " . DebugSupport::dumpVar('') . "<br>";
|
||||
print "S::DUMPVAR(,s): " . DebugSupport::dumpVar(null) . "<br>";
|
||||
print "S::DUMPVAR([a,b]): " . DebugSupport::dumpVar(['a', 'b']) . "<br>";
|
||||
print "S::DUMPVAR([a,b],true): " . DebugSupport::dumpVar(['a', 'b'], true) . "<br>";
|
||||
print "S::DUMPVAR([MIXED]): " . DebugSupport::dumpVar(<<<EOM
|
||||
Line is
|
||||
break
|
||||
with
|
||||
<html>block</html>
|
||||
and > and <
|
||||
EOM) . "<br>";
|
||||
// exportVar
|
||||
// print "S::EXPORTVAR(s): " . DebugSupport::exportVar('SET') . "<br>";
|
||||
// print "S::EXPORTVAR(s>): " . DebugSupport::exportVar('<SET>') . "<br>";
|
||||
// print "S::EXPORTVAR(''): " . DebugSupport::exportVar('') . "<br>";
|
||||
// print "S::EXPORTVAR(,s): " . DebugSupport::exportVar(null) . "<br>";
|
||||
// print "S::EXPORTVAR([a,b]): " . DebugSupport::exportVar(['a', 'b']) . "<br>";
|
||||
// print "S::EXPORTVAR([a,b],true): " . DebugSupport::exportVar(['a', 'b']) . "<br>";
|
||||
|
||||
// get test
|
||||
print "LOG FOLDER: " . $debug->getSetting('log_folder') . "<br>";
|
||||
@@ -95,7 +121,7 @@ print "C->PRINTERRORMSG: <br>" . $debug->printErrorMsg() . "<br>";
|
||||
echo "<b>OPTIONS DEBUG CALL</b><br>";
|
||||
|
||||
// new log type with options
|
||||
$new_log = new CoreLibs\Debug\Logging([
|
||||
$new_log = new CoreLibs\Debug\LoggingLegacy([
|
||||
'log_folder' => '../log/',
|
||||
'file_id' => 'DebugTestNewLogger',
|
||||
// add file date
|
||||
@@ -125,11 +151,14 @@ echo "<b>CLASS DEBUG CALL</b><br>";
|
||||
// @codingStandardsIgnoreLine
|
||||
class TestL
|
||||
{
|
||||
/** @var \CoreLibs\Debug\Logging */
|
||||
/** @var \CoreLibs\Debug\LoggingLegacy */
|
||||
public $log;
|
||||
public function __construct()
|
||||
{
|
||||
$this->log = new CoreLibs\Debug\Logging();
|
||||
$this->log = new CoreLibs\Debug\LoggingLegacy([
|
||||
'log_folder' => '../log/',
|
||||
'file_id' => 'DebugTestTestLLogger',
|
||||
]);
|
||||
}
|
||||
/**
|
||||
* Undocumented function
|
||||
@@ -183,9 +212,9 @@ print "CLASS EXTEND: PRINTERRORMSG: <br>" . $tr->log->printErrorMsg() . "<br>";
|
||||
// @codingStandardsIgnoreLine
|
||||
class AttachOutside
|
||||
{
|
||||
/** @var \CoreLibs\Debug\Logging */
|
||||
/** @var \CoreLibs\Debug\LoggingLegacy */
|
||||
public $log;
|
||||
public function __construct(\CoreLibs\Debug\Logging $logger_class)
|
||||
public function __construct(\CoreLibs\Debug\LoggingLegacy $logger_class)
|
||||
{
|
||||
$this->log = $logger_class;
|
||||
}
|
||||
@@ -206,6 +235,7 @@ print "AO-CLASS: DEBUG: " . $ao->test() . "<br>";
|
||||
print "GETCALLERCLASS(NON CLASS): " . \CoreLibs\Debug\Support::getCallerClass() . "<br>";
|
||||
|
||||
// fdebug
|
||||
print "S::FSETFILENAME: " . FileWriter::fsetFolder(BASE . LOG) . "<br>";
|
||||
print "S::FSETFILENAME: " . FileWriter::fsetFilename('class_test_debug_file.log') . "<br>";
|
||||
print "S::FDEBUG: " . FileWriter::fdebug('CLASS TEST DEBUG FILE: ' . date('Y-m-d H:i:s')) . "<br>";
|
||||
|
||||
@@ -218,6 +248,12 @@ $debug->setLogPer('level', false);
|
||||
$ar = ['A', 1, ['B' => 'D']];
|
||||
$debug->debug('ARRAY', 'Array: ' . $debug->prAr($ar));
|
||||
$debug->debug('BOOL', 'True: ' . $debug->prBl(true) . ', False: ' . $debug->prBl(false));
|
||||
$debug->debug('MIXED', 'ANYTHING: ' . DebugSupport::dumpVar([
|
||||
'foo' => 1,
|
||||
'bar' => null,
|
||||
'self' => [1, 2, 3],
|
||||
'other' => false
|
||||
]));
|
||||
|
||||
// error message
|
||||
// future DEPRECATED
|
||||
|
||||
Reference in New Issue
Block a user