Debugger Test updates for logger attching to classes
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
* @phan-file-suppress PhanTypeSuspiciousStringExpression
|
||||
*/
|
||||
|
||||
$DEBUG_ALL_OVERRIDE = 0; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = 1;
|
||||
$PRINT_ALL = 1;
|
||||
$DB_DEBUG = 1;
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
if ($DEBUG_ALL) {
|
||||
error_reporting(E_ALL | E_STRICT | E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR);
|
||||
|
||||
@@ -100,6 +100,23 @@ print "CLASS EXTEND: DEBUG/tl: ".$tr->test('TESTR OUTSIDE')."<br>";
|
||||
print "CLASS EXTEND: DEBUG/tr: ".$tr->subTest()."<br>";
|
||||
print "CLASS EXTEND: PRINTERRORMSG: <br>".$tr->log->printErrorMsg()."<br>";
|
||||
|
||||
// test attaching a logger from outside
|
||||
class AttachOutside
|
||||
{
|
||||
public $log;
|
||||
public function __construct(object $logger_class)
|
||||
{
|
||||
$this->log = $logger_class;
|
||||
}
|
||||
public function test()
|
||||
{
|
||||
$this->log->debug('ATTACHOUTSIDE', 'A test');
|
||||
return get_class($this);
|
||||
}
|
||||
}
|
||||
$ao = new AttachOutside($basic->log);
|
||||
print "AO-CLASS: DEBUG: ".$ao->test()."<br>";
|
||||
|
||||
print "GETCALLERCLASS(NON CLASS): ".\CoreLibs\Debug\Support::getCallerClass()."<br>";
|
||||
|
||||
// fdebug
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* basic class start class for ALL clases, holds basic vars, infos, methods, etc
|
||||
*
|
||||
* HISTORY:
|
||||
* 2021/06/16 (cs) CLASS MOSTLY DEPRECATED: moved all methids in their own classes
|
||||
* 2010/12/24 (cs) add crypt classes with auto detect what crypt we can use, add php version check class
|
||||
* 2008/08/07 (cs) fixed strange DEBUG_ALL on off behavour. data was written even thought DBEUG_ALL was off. now no debug logging is done at all if DEBUG_ALL is off
|
||||
* 2007/11/13 (cs) add Comparedate function
|
||||
|
||||
Reference in New Issue
Block a user