diff --git a/4dev/tests/CoreLibsCreateSessionTest.php b/4dev/tests/CoreLibsCreateSessionTest.php
new file mode 100644
index 00000000..ed08531d
--- /dev/null
+++ b/4dev/tests/CoreLibsCreateSessionTest.php
@@ -0,0 +1,104 @@
+ [
+ 'sessionNameParameter',
+ 'p',
+ 'sessionNameParameter',
+ '/^\w+$/'
+ ],
+ 'session globals' => [
+ 'sessionNameGlobals',
+ 'g',
+ 'sessionNameGlobals',
+ '/^\w+$/'
+ ],
+ 'session constant' => [
+ 'sessionNameConstant',
+ 'c',
+ 'sessionNameConstant',
+ '/^\w+$/'
+ ],
+ ];
+ }
+
+ /**
+ * Undocumented function
+ *
+ * @return void
+ */
+ protected function setUp(): void
+ {
+ if (session_id()) {
+ session_destroy();
+ }
+ }
+
+ /**
+ * Undocumented function
+ *
+ * @dataProvider sessionProvider
+ * @testdox startSession $input name for $type will be $expected_n with $expected_i [$_dataName]
+ *
+ * @param string $input
+ * @param string $type
+ * @param string|bool $expected_n
+ * @param string|bool $expected_i
+ * @return void
+ */
+ public function testStartSession(string $input, string $type, $expected_n, $expected_i): void
+ {
+ /* $session_id = '';
+ switch ($type) {
+ case 'p':
+ $session_id = \CoreLibs\Create\Session::startSession($input);
+ break;
+ case 'g':
+ $GLOBALS['SET_SESSION_NAME'] = $input;
+ $session_id = \CoreLibs\Create\Session::startSession();
+ break;
+ case 'c':
+ define('SET_SESSION_NAME', $input);
+ $session_id = \CoreLibs\Create\Session::startSession();
+ break;
+ }
+ $this->assertMatchesRegularExpression(
+ $expected_i,
+ (string)$session_id
+ );
+ $this->assertMatchesRegularExpression(
+ $expected_i,
+ (string)\CoreLibs\Create\Session::getSessionId()
+ );
+ $this->assertEquals(
+ $expected_n,
+ \CoreLibs\Create\Session::getSessionName()
+ );
+ if ($type == 'g') {
+ unset($GLOBALS['SET_SESSION_NAME']);
+ } */
+ $this->markTestSkipped('No implementation for Create\Session. Cannot run session_start in CLI');
+ }
+}
+
+// __END__
diff --git a/4dev/tests/CoreLibsDebugLoggingTest.php b/4dev/tests/CoreLibsDebugLoggingTest.php
index 949b5f14..39152527 100644
--- a/4dev/tests/CoreLibsDebugLoggingTest.php
+++ b/4dev/tests/CoreLibsDebugLoggingTest.php
@@ -23,21 +23,27 @@ final class CoreLibsDebugLoggingTest extends TestCase
'log_folder' => '/tmp'
],
[
- 'log_folder' => '/tmp/'
+ 'log_folder' => '/tmp/',
+ 'debug_all' => false,
+ 'print_all' => false,
],
[]
],
'nothing set' => [
null,
[
- 'log_folder' => getcwd() . DIRECTORY_SEPARATOR
+ 'log_folder' => getcwd() . DIRECTORY_SEPARATOR,
+ 'debug_all' => false,
+ 'print_all' => false,
],
[]
],
'no options set, constant set' => [
null,
[
- 'log_folder' => '/tmp/'
+ 'log_folder' => '/tmp/',
+ 'debug_all' => false,
+ 'print_all' => false,
],
[
'constant' => [
@@ -46,6 +52,19 @@ final class CoreLibsDebugLoggingTest extends TestCase
]
]
],
+ 'standard test set' => [
+ [
+ 'log_folder' => '/tmp',
+ 'debug_all' => true,
+ 'print_all' => true,
+ ],
+ [
+ 'log_folder' => '/tmp/',
+ 'debug_all' => true,
+ 'print_all' => true,
+ ],
+ []
+ ]
];
}
@@ -76,11 +95,21 @@ final class CoreLibsDebugLoggingTest extends TestCase
$this->log = new \CoreLibs\Debug\Logging($options);
}
// check that settings match
- // print "LOG: " . $this->log->getSetting('log_folder') . "\n";
$this->assertEquals(
$expected['log_folder'],
$this->log->getSetting('log_folder')
);
+ $this->assertEquals(
+ $expected['debug_all'],
+ $this->log->getSetting('debug_all')
+ );
+ $this->assertEquals(
+ $expected['print_all'],
+ $this->log->getSetting('print_all')
+ );
+ print "LOG: " . $this->log->getSetting('log_folder') . "\n";
+ print "DEBUG: " . $this->log->getSetting('debug_all') . "\n";
+ print "PRINT: " . $this->log->getSetting('print_all') . "\n";
}
// setting tests
diff --git a/4dev/tests/CoreLibsLanguageL10n.php b/4dev/tests/CoreLibsLanguageL10nTest.php
similarity index 100%
rename from 4dev/tests/CoreLibsLanguageL10n.php
rename to 4dev/tests/CoreLibsLanguageL10nTest.php
diff --git a/README.md b/README.md
index 56934e00..b357e6d6 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,8 @@ There are three branches:
### master
-The active branch, which is the namespace branch
+The active branch, which is the namespace branch.
+Currently compatible with PHP 7.4 and 8.0
### legacy
@@ -48,3 +49,38 @@ pslam is setup but not configured
With phpunit (`4dev/checking/phpunit.sh`)
`phpunit -c $phpunit.xml 4dev/tests/`
+
+
+## Other Notes
+
+### Session used
+
+The following classes use _SESSION
+The main one is ACL\Login, this class will fail without a session started
+
+ * \CoreLibs\ACL\Login
+ * \CoreLibs\Admin\Backend
+ * \CoreLibs\Output\Form\Generate
+ * \CoreLibs\Output\Form\Token
+ * \CoreLibs\Template\SmartyExtend
+
+### Class extends
+
+The following classes extend these classes
+
+ * \CoreLibs\ACL\Login extends \CoreLibs\DB\IO
+ * \CoreLibs\Admin\Backend extends \CoreLibs\DB\IO
+ * \CoreLibs\DB\Extended\ArrayIO extends \CoreLibs\DB\IO
+ * \CoreLibs\Output\Form\Generate extends \CoreLibs\DB\Extended\ArrayIO
+ * \CoreLibs\Template\SmartyExtend extends SmartyBC
+
+### Class used
+
+The following classes use the following classes
+
+* \CoreLibs\ACL\Login uses \CoreLibs\Debug\Logger, \CoreLibs\Language\L10n
+* \CoreLibs\DB\IO uses \CoreLibs\Debug\Logger, \CoreLibs\DB\SQL\PgSQL
+* \CoreLibs\Admin\Backend uses \CoreLibs\Debug\Logger, \CoreLibs\Language\L10n
+* \CoreLibs\Output\Form\Generate uses \CoreLibs\Debug\Logger, \CoreLibs\Language\L10n
+* \CoreLibs\Template\SmartyExtend uses \CoreLibs\Language\L10n
+* \CoreLibs\Language\L10n uses FileReader, GetTextReader
diff --git a/www/admin/class_test.admin.backend.php b/www/admin/class_test.admin.backend.php
index 8eb97ff9..87140bca 100644
--- a/www/admin/class_test.admin.backend.php
+++ b/www/admin/class_test.admin.backend.php
@@ -31,8 +31,18 @@ if (!defined('SET_SESSION_NAME')) {
$LOG_FILE_ID = 'classTest-admin';
ob_end_flush();
-$basic = new CoreLibs\Basic();
-$backend = new CoreLibs\Admin\Backend(DB_CONFIG);
+$log = new CoreLibs\Debug\Logging([
+ 'log_folder' => BASE . LOG,
+ 'file_id' => $LOG_FILE_ID,
+ // add file date
+ 'print_file_date' => true,
+ // set debug and print flags
+ 'debug_all' => $DEBUG_ALL ?? false,
+ 'echo_all' => $ECHO_ALL ?? false,
+ 'print_all' => $PRINT_ALL ?? false,
+]);
+$basic = new CoreLibs\Basic($log);
+$backend = new CoreLibs\Admin\Backend(DB_CONFIG, $log);
print "
TEST CLASS: ADMIN BACKEND";
print "";
@@ -47,7 +57,7 @@ print "Messaes: " . \CoreLibs\Debug\Support::printAr($this->messages) . "
";
print "ADBPRINTDATETIME:
" . $backend->adbPrintDateTime(2021, 6, 21, 6, 38, '_test') . "
";
// error message
-print $basic->log->printErrorMsg();
+print $log->printErrorMsg();
print "";
diff --git a/www/admin/class_test.array.php b/www/admin/class_test.array.php
index 98524a19..192edf89 100644
--- a/www/admin/class_test.array.php
+++ b/www/admin/class_test.array.php
@@ -32,7 +32,17 @@ ob_end_flush();
use CoreLibs\Combined\ArrayHandler;
use CoreLibs\Debug\Support as DgS;
-$basic = new CoreLibs\Basic();
+$log = new CoreLibs\Debug\Logging([
+ 'log_folder' => BASE . LOG,
+ 'file_id' => $LOG_FILE_ID,
+ // add file date
+ 'print_file_date' => true,
+ // set debug and print flags
+ 'debug_all' => $DEBUG_ALL ?? false,
+ 'echo_all' => $ECHO_ALL ?? false,
+ 'print_all' => $PRINT_ALL ?? false,
+]);
+$basic = new CoreLibs\Basic($log);
// $_array = new CoreLibs\Combined\ArrayHandler();
// $array_class = 'CoreLibs\Combination\ArrayHandler';
@@ -207,7 +217,7 @@ $output = \CoreLibs\Combined\ArrayHandler::genAssocArray($db_array, $key, $value
print "OUTPUT: " . \CoreLibs\Debug\Support::printAr($output) . "
";
// error message
-print $basic->log->printErrorMsg();
+print $log->printErrorMsg();
print "";
diff --git a/www/admin/class_test.byte.php b/www/admin/class_test.byte.php
index b255ebc3..f8ad47cf 100644
--- a/www/admin/class_test.byte.php
+++ b/www/admin/class_test.byte.php
@@ -31,7 +31,17 @@ ob_end_flush();
use CoreLibs\Convert\Byte;
-$basic = new CoreLibs\Basic();
+$log = new CoreLibs\Debug\Logging([
+ 'log_folder' => BASE . LOG,
+ 'file_id' => $LOG_FILE_ID,
+ // add file date
+ 'print_file_date' => true,
+ // set debug and print flags
+ 'debug_all' => $DEBUG_ALL ?? false,
+ 'echo_all' => $ECHO_ALL ?? false,
+ 'print_all' => $PRINT_ALL ?? false,
+]);
+$basic = new CoreLibs\Basic($log);
$byte_class = 'CoreLibs\Convert\Byte';
print "TEST CLASS: BYTE CONVERT";
@@ -104,7 +114,7 @@ print "BYTE TO: $byte: ".$basic->humanReadableByteFormat($byte)."
";
print "BYTE FROM: $string: ".$basic->stringByteFormat($string)."
"; */
// error message
-print $basic->log->printErrorMsg();
+print $log->printErrorMsg();
print "";
diff --git a/www/admin/class_test.colors.php b/www/admin/class_test.colors.php
index d49f4071..d3a1b627 100644
--- a/www/admin/class_test.colors.php
+++ b/www/admin/class_test.colors.php
@@ -32,7 +32,17 @@ ob_end_flush();
use CoreLibs\Convert\Colors;
use CoreLibs\Debug\Support as DgS;
-$basic = new CoreLibs\Basic();
+$log = new CoreLibs\Debug\Logging([
+ 'log_folder' => BASE . LOG,
+ 'file_id' => $LOG_FILE_ID,
+ // add file date
+ 'print_file_date' => true,
+ // set debug and print flags
+ 'debug_all' => $DEBUG_ALL ?? false,
+ 'echo_all' => $ECHO_ALL ?? false,
+ 'print_all' => $PRINT_ALL ?? false,
+]);
+$basic = new CoreLibs\Basic($log);
$color_class = 'CoreLibs\Convert\Colors';
print "TEST CLASS: COLORS";
@@ -70,7 +80,7 @@ print "S::COLOR hsb->rgb: $hsb[0], $hsb[1], $hsb[2]: "
// TODO: run compare check input must match output
// error message
-print $basic->log->printErrorMsg();
+print $log->printErrorMsg();
print "";
diff --git a/www/admin/class_test.datetime.php b/www/admin/class_test.datetime.php
index 99114809..80ab868f 100644
--- a/www/admin/class_test.datetime.php
+++ b/www/admin/class_test.datetime.php
@@ -32,7 +32,17 @@ ob_end_flush();
use CoreLibs\Combined\DateTime;
use CoreLibs\Debug\Support as DgS;
-$basic = new CoreLibs\Basic();
+$log = new CoreLibs\Debug\Logging([
+ 'log_folder' => BASE . LOG,
+ 'file_id' => $LOG_FILE_ID,
+ // add file date
+ 'print_file_date' => true,
+ // set debug and print flags
+ 'debug_all' => $DEBUG_ALL ?? false,
+ 'echo_all' => $ECHO_ALL ?? false,
+ 'print_all' => $PRINT_ALL ?? false,
+]);
+$basic = new CoreLibs\Basic($log);
$datetime_class = 'CoreLibs\Combined\DateTime';
print "TEST CLASS: DATE/TIME";
@@ -152,7 +162,7 @@ print "CALCDAYSINTERVAL(named): $compare_date[0] = $compare_date[1]: "
. DgS::printAr($basic->calcDaysInterval($compare_date[0], $compare_date[1], true))."
"; */
// error message
-print $basic->log->printErrorMsg();
+print $log->printErrorMsg();
print "";
diff --git a/www/admin/class_test.db.php b/www/admin/class_test.db.php
index 8dd5181c..154c55ef 100644
--- a/www/admin/class_test.db.php
+++ b/www/admin/class_test.db.php
@@ -32,8 +32,20 @@ $LOG_FILE_ID = 'classTest-db';
ob_end_flush();
use CoreLibs\Debug\Support as DgS;
+use CoreLibs\DB\IO as DbIo;
-$db = $basic = new CoreLibs\Admin\Backend(DB_CONFIG);
+$log = new CoreLibs\Debug\Logging([
+ 'log_folder' => BASE . LOG,
+ 'file_id' => $LOG_FILE_ID,
+ // add file date
+ 'print_file_date' => true,
+ // set debug and print flags
+ 'debug_all' => $DEBUG_ALL ?? false,
+ 'echo_all' => $ECHO_ALL ?? false,
+ 'print_all' => $PRINT_ALL ?? false,
+]);
+$basic = new CoreLibs\Basic($log);
+$db = new CoreLibs\Admin\Backend(DB_CONFIG, $log);
// NEXT STEP
// $basic = new CoreLibs\Basic();
@@ -46,13 +58,15 @@ print "TEST CLASS: DB";
print "";
print '';
+print "LOGFILE NAME: " . $db->log->getSetting('log_file_name') . "
";
+print "LOGFILE ID: " . $db->log->getSetting('log_file_id') . "
";
print "DBINFO: " . $db->dbInfo() . "
";
echo "DB_CONFIG_SET constant: " . print_r(DB_CONFIG, true) . "
";
// DB client encoding
print "DB Client encoding: " . $db->dbGetEncoding() . "
";
-while (is_array($res = $db->dbReturn("SELECT * FROM max_test", 0, true))) {
+while (is_array($res = $db->dbReturn("SELECT * FROM max_test", DbIo::USE_CACHE, true))) {
print "TIME: " . $res['time'] . "
";
}
print "CACHED DATA: " . print_r($db->cursor_ext, true) . "
";
@@ -324,7 +338,7 @@ print "ISSET: " . isset($res['null_varchar']) . "
";
print "EMPTY: " . empty($res['null_varchar']) . "
";
// error message
-print $basic->log->printErrorMsg();
+print $log->printErrorMsg();
print "";
diff --git a/www/admin/class_test.debug.php b/www/admin/class_test.debug.php
index f427aa7f..e477a516 100644
--- a/www/admin/class_test.debug.php
+++ b/www/admin/class_test.debug.php
@@ -63,6 +63,31 @@ print "C->DEBUG: " . $debug->debug('CLASS-TEST-DEBUG', 'Class Test Debug') . "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 "OPTIONS DEBUG CALL
";
+
+// new log type with options
+$new_log = new CoreLibs\Debug\Logging([
+ 'log_folder' => '../log/',
+ 'file_id' => 'DebugTestNewLogger',
+ // add file date
+ 'print_file_date' => true,
+ // split into level (debug code)
+ 'per_level' => false,
+ // per class called
+ 'per_class' => false,
+ // per page
+ 'per_page' => false,
+ // for each page call
+ 'per_run' => false,
+ // set debug and print flags
+ 'debug_all' => true,
+ 'echo_all' => true,
+ 'print_all' => true,
+]);
+$new_log->debug('OPTIONS TYPE', 'New Type error');
+print "OPTIONS LOGGER:
" . $new_log->printErrorMsg();
+
echo "CLASS DEBUG CALL
";
// @codingStandardsIgnoreLine
diff --git a/www/admin/class_test.email.php b/www/admin/class_test.email.php
index 451efad2..15efcb44 100644
--- a/www/admin/class_test.email.php
+++ b/www/admin/class_test.email.php
@@ -32,7 +32,17 @@ ob_end_flush();
use CoreLibs\Check\Email;
use CoreLibs\Debug\Support as DgS;
-$basic = new CoreLibs\Basic();
+$log = new CoreLibs\Debug\Logging([
+ 'log_folder' => BASE . LOG,
+ 'file_id' => $LOG_FILE_ID,
+ // add file date
+ 'print_file_date' => true,
+ // set debug and print flags
+ 'debug_all' => $DEBUG_ALL ?? false,
+ 'echo_all' => $ECHO_ALL ?? false,
+ 'print_all' => $PRINT_ALL ?? false,
+]);
+$basic = new CoreLibs\Basic($log);
print "TEST CLASS: HTML/ELEMENTS";
print "";
@@ -78,7 +88,7 @@ foreach ($email as $s_email) {
} */
// error message
-print $basic->log->printErrorMsg();
+print $log->printErrorMsg();
print "";
diff --git a/www/admin/class_test.encoding.php b/www/admin/class_test.encoding.php
index 561d2ac7..6ef01c98 100644
--- a/www/admin/class_test.encoding.php
+++ b/www/admin/class_test.encoding.php
@@ -31,7 +31,17 @@ ob_end_flush();
use CoreLibs\Language\Encoding;
-$basic = new CoreLibs\Basic();
+$log = new CoreLibs\Debug\Logging([
+ 'log_folder' => BASE . LOG,
+ 'file_id' => $LOG_FILE_ID,
+ // add file date
+ 'print_file_date' => true,
+ // set debug and print flags
+ 'debug_all' => $DEBUG_ALL ?? false,
+ 'echo_all' => $ECHO_ALL ?? false,
+ 'print_all' => $PRINT_ALL ?? false,
+]);
+$basic = new CoreLibs\Basic($log);
$_encoding = new CoreLibs\Language\Encoding();
$encoding_class = 'CoreLibs\Language\Encoding';
@@ -93,7 +103,7 @@ print "CONV ENCODING: $_string: ".$basic->convertEncoding($_string, 'ISO-2022-JP
print "D/__MBMIMEENCODE: ".$basic->__mbMimeEncode('Some Text', 'UTF-8')."
"; */
// error message
-print $basic->log->printErrorMsg();
+print $basic->printErrorMsg();
print "";
diff --git a/www/admin/class_test.file.php b/www/admin/class_test.file.php
index 07f44833..cb0112d0 100644
--- a/www/admin/class_test.file.php
+++ b/www/admin/class_test.file.php
@@ -31,7 +31,17 @@ ob_end_flush();
use CoreLibs\Check\File;
-$basic = new CoreLibs\Basic();
+$log = new CoreLibs\Debug\Logging([
+ 'log_folder' => BASE . LOG,
+ 'file_id' => $LOG_FILE_ID,
+ // add file date
+ 'print_file_date' => true,
+ // set debug and print flags
+ 'debug_all' => $DEBUG_ALL ?? false,
+ 'echo_all' => $ECHO_ALL ?? false,
+ 'print_all' => $PRINT_ALL ?? false,
+]);
+$basic = new CoreLibs\Basic($log);
print "TEST CLASS: FILE";
print "";
@@ -43,7 +53,7 @@ $file = getcwd() . DIRECTORY_SEPARATOR . 'class_test.file.php';
print "GETLINESFROMFILE: $file: " . File::getLinesFromFile($file) . "
";
// error message
-print $basic->log->printErrorMsg();
+print $log->printErrorMsg();
print "";
diff --git a/www/admin/class_test.hash.php b/www/admin/class_test.hash.php
index aec85b70..52c4c2b2 100644
--- a/www/admin/class_test.hash.php
+++ b/www/admin/class_test.hash.php
@@ -31,7 +31,17 @@ ob_end_flush();
use CoreLibs\Create\Hash;
-$basic = new CoreLibs\Basic();
+$log = new CoreLibs\Debug\Logging([
+ 'log_folder' => BASE . LOG,
+ 'file_id' => $LOG_FILE_ID,
+ // add file date
+ 'print_file_date' => true,
+ // set debug and print flags
+ 'debug_all' => $DEBUG_ALL ?? false,
+ 'echo_all' => $ECHO_ALL ?? false,
+ 'print_all' => $PRINT_ALL ?? false,
+]);
+$basic = new CoreLibs\Basic($log);
$hash_class = 'CoreLibs\Create\Hash';
// define a list of from to color sets for conversion test
@@ -58,7 +68,7 @@ print "D/__SHA1SHORT(off): $to_crc: ".$basic->__sha1short($to_crc)."
";
print "D/__hash(d): $to_crc: ".$basic->__hash($to_crc)."
"; */
// error message
-print $basic->log->printErrorMsg();
+print $log->printErrorMsg();
print "";
diff --git a/www/admin/class_test.html.php b/www/admin/class_test.html.php
index 10c6f663..23916d84 100644
--- a/www/admin/class_test.html.php
+++ b/www/admin/class_test.html.php
@@ -32,7 +32,17 @@ ob_end_flush();
use CoreLibs\Convert\Html;
use CoreLibs\Output\Form\Elements;
-$basic = new CoreLibs\Basic();
+$log = new CoreLibs\Debug\Logging([
+ 'log_folder' => BASE . LOG,
+ 'file_id' => $LOG_FILE_ID,
+ // add file date
+ 'print_file_date' => true,
+ // set debug and print flags
+ 'debug_all' => $DEBUG_ALL ?? false,
+ 'echo_all' => $ECHO_ALL ?? false,
+ 'print_all' => $PRINT_ALL ?? false,
+]);
+$basic = new CoreLibs\Basic($log);
$_html = new CoreLibs\Convert\Html();
$_elements = new CoreLibs\Output\Form\Elements();
$html_class = 'CoreLibs\Convert\Html';
@@ -109,7 +119,7 @@ print "LB remove: " . \CoreLibs\Convert\Html::removeLB($text) . "
";
print "LB remove: " . \CoreLibs\Convert\Html::removeLB($text, '##BR##') . "
";
// error message
-print $basic->log->printErrorMsg();
+print $log->printErrorMsg();
print "";
diff --git a/www/admin/class_test.image.php b/www/admin/class_test.image.php
index 61888392..7c18994f 100644
--- a/www/admin/class_test.image.php
+++ b/www/admin/class_test.image.php
@@ -31,7 +31,17 @@ ob_end_flush();
use CoreLibs\Output\Image;
-$basic = new CoreLibs\Basic();
+$log = new CoreLibs\Debug\Logging([
+ 'log_folder' => BASE . LOG,
+ 'file_id' => $LOG_FILE_ID,
+ // add file date
+ 'print_file_date' => true,
+ // set debug and print flags
+ 'debug_all' => $DEBUG_ALL ?? false,
+ 'echo_all' => $ECHO_ALL ?? false,
+ 'print_all' => $PRINT_ALL ?? false,
+]);
+$basic = new CoreLibs\Basic($log);
$_image = new CoreLibs\Output\Image();
$image_class = 'CoreLibs\Output\Image';
@@ -112,7 +122,7 @@ echo "S::CREATETHUMBNAILSIMPLE: ".basename($image).": WIDTH: $thumb_widthcreateThumbnailSimple($image, $thumb_width).">
"; */
// error message
-print $basic->log->printErrorMsg();
+print $log->printErrorMsg();
print "";
diff --git a/www/admin/class_test.json.php b/www/admin/class_test.json.php
index 15f93e20..04f753f0 100644
--- a/www/admin/class_test.json.php
+++ b/www/admin/class_test.json.php
@@ -32,7 +32,17 @@ ob_end_flush();
use CoreLibs\Convert\Json;
use CoreLibs\Debug\Support as DgS;
-$basic = new CoreLibs\Basic();
+$log = new CoreLibs\Debug\Logging([
+ 'log_folder' => BASE . LOG,
+ 'file_id' => $LOG_FILE_ID,
+ // add file date
+ 'print_file_date' => true,
+ // set debug and print flags
+ 'debug_all' => $DEBUG_ALL ?? false,
+ 'echo_all' => $ECHO_ALL ?? false,
+ 'print_all' => $PRINT_ALL ?? false,
+]);
+$basic = new CoreLibs\Basic($log);
$json_class = 'CoreLibs\Convert\Json';
// define a list of from to color sets for conversion test
@@ -74,7 +84,7 @@ print "E-JSON ERROR: ".$basic->jsonGetLastError().": ".$basic->jsonGetLastError(
// print "S::JSON ERROR: " . Jason::jsonGetLastError() . ": " . Jason::jsonGetLastError(true) . "
";
// error message
-print $basic->log->printErrorMsg();
+print $log->printErrorMsg();
print "