|
|
@ -48,6 +48,12 @@ class Console |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private static $logEnabled = true; |
|
|
|
private static $logEnabled = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Enables or disables verbose logging |
|
|
|
|
|
|
|
* @var boolean |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private static $verboseLogEnabled = false; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* String Buffer for the screen output |
|
|
|
* String Buffer for the screen output |
|
|
|
* @var string |
|
|
|
* @var string |
|
|
@ -107,6 +113,8 @@ class Console |
|
|
|
self::$logEnabled = $config->general('logging', false); |
|
|
|
self::$logEnabled = $config->general('logging', false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self::$verboseLogEnabled = $config->general('verbose_logging', false); |
|
|
|
|
|
|
|
|
|
|
|
// Greetings |
|
|
|
// Greetings |
|
|
|
if ($showGreetings) { |
|
|
|
if ($showGreetings) { |
|
|
|
if (!self::$logEnabled) { |
|
|
|
if (!self::$logEnabled) { |
|
|
@ -228,7 +236,7 @@ class Console |
|
|
|
$message = date('Y-m-d H:i:s -- ') . $message; |
|
|
|
$message = date('Y-m-d H:i:s -- ') . $message; |
|
|
|
fwrite(self::$log, $message . PHP_EOL); |
|
|
|
fwrite(self::$log, $message . PHP_EOL); |
|
|
|
|
|
|
|
|
|
|
|
if (self::$config->general('verbose_logging', false)) { |
|
|
|
if (self::$verboseLogEnabled) { |
|
|
|
echo $message . PHP_EOL; |
|
|
|
echo $message . PHP_EOL; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|