BASE . LOG, 'log_file_id' => $LOG_FILE_ID, 'log_level' => Level::Debug, 'log_per_date' => true, ]); $PAGE_NAME = 'TEST CLASS: DEBUG LOGGING'; print ""; print "" . $PAGE_NAME . ""; print ""; print '
Class Test Master
'; print '

' . $PAGE_NAME . '

'; $log->logger2Debug(); print "Level 250: " . Level::fromValue(250)->getName() . "
"; print "Flag: per_run (from int): " . Flag::fromValue(2)->getName() . "
"; print "Flag: per_run getName(): " . Flag::per_class->getName() . "
"; print "Flag: per_run ->name: " . Flag::per_class->name . "
"; print "Flag: per_run ->value: " . Flag::per_class->value . "
"; $log->setLogUniqueId(); print "LogUniqId: " . $log->getLogUniqueId() . "
"; print "DUMP: " . $log->dV(['something' => 'error']) . "
"; $log->debug('LEGACY', 'Some legacy shit here'); $log->debug('ARRAY', 'Dump some data: ' . $log->dV(['something' => 'error'])); $log->debug('MIXED', 'Dump mixed: ' . $log->dV(<<block and > and < EOM)); $log->info('Info message', ['info' => 'log']); $log->error('Cannot process data', ['error' => 'log']); print "Log File: " . $log->getLogFile() . "
"; // init empty unset($LOG_FILE_ID); $ll = new CoreLibs\Logging\Logging([ 'log_folder' => BASE . LOG, ]); print "LFI: " . $ll->getLogFileId() . "
"; try { $ll->setLoggingLevel('Invalid'); } catch (\Psr\Log\InvalidArgumentException $e) { print "Invalid option: " . $e->getMessage() . "
"; } /* $ll = new CoreLibs\Logging\Logging([ 'log_folder' => BASE . LOG, 'log_file_id' => 'a', 'log_file_id' => 'a', ]); */ // @codingStandardsIgnoreLine Class TestP { /** @var \CoreLibs\Logging\Logging */ public $log; public function __construct( \CoreLibs\Logging\Logging $log ) { $this->log = $log; } public function test(): void { $this->log->info('TestL::test call'); } } $tl = new TestP($log); $tl->test(); print '
' . '
' // . '
'
	. nl2br(htmlentities(file_get_contents($log->getLogFolder() . $log->getLogFile()) ?: ''))
	// . '
' . '
'; print ""; // __END__