set logger and add option to turn it off again

This commit is contained in:
Uwe Steinmann 2022-05-12 09:02:24 +02:00
parent 38ac4e6005
commit c8ec7d70f0

View File

@ -18,12 +18,13 @@ function usage() { /* {{{ */
echo " -h, --help: print usage information and exit.".PHP_EOL;
echo " -v, --version: print version and exit.".PHP_EOL;
echo " -c: recreate index.".PHP_EOL;
echo " --no-log: do not log.".PHP_EOL;
echo " --config: set alternative config file.".PHP_EOL;
} /* }}} */
$version = "0.0.2";
$version = "0.0.3";
$shortoptions = "hvc";
$longoptions = array('help', 'version', 'config:');
$longoptions = array('help', 'version', 'config:', 'no-log');
if(false === ($options = getopt($shortoptions, $longoptions))) {
usage();
exit(0);
@ -55,6 +56,8 @@ if(isset($options['c'])) {
}
include($myincpath."/inc/inc.Settings.php");
if(empty($options['no-log']))
include($myincpath."/inc/inc.LogInit.php");
include($myincpath."/inc/inc.Init.php");
include($myincpath."/inc/inc.Extension.php");
include($myincpath."/inc/inc.DBInit.php");