|
|
|
@ -48,6 +48,12 @@ class Console
|
|
|
|
|
*/ |
|
|
|
|
private static $logEnabled = true; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Enables or disables verbose logging |
|
|
|
|
* @var boolean |
|
|
|
|
*/ |
|
|
|
|
private static $verboseLogEnabled = false; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* String Buffer for the screen output |
|
|
|
|
* @var string |
|
|
|
@ -107,6 +113,8 @@ class Console
|
|
|
|
|
self::$logEnabled = $config->general('logging', false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
self::$verboseLogEnabled = self::isVerboseLoggingEnabled(); |
|
|
|
|
|
|
|
|
|
// Greetings |
|
|
|
|
if ($showGreetings) { |
|
|
|
|
if (!self::$logEnabled) { |
|
|
|
@ -173,6 +181,7 @@ class Console
|
|
|
|
|
{ |
|
|
|
|
self::log(strip_tags($message)); |
|
|
|
|
|
|
|
|
|
if (!self::$verboseLogEnabled) { |
|
|
|
|
self::$screenBuffer .= str_repeat("\t", $tabs) |
|
|
|
|
. strip_tags($message) |
|
|
|
|
. str_repeat(PHP_EOL, $newLine); |
|
|
|
@ -183,6 +192,7 @@ class Console
|
|
|
|
|
|
|
|
|
|
echo $output; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Executes a Command on the Shell |
|
|
|
@ -227,6 +237,10 @@ class Console
|
|
|
|
|
|
|
|
|
|
$message = date('Y-m-d H:i:s -- ') . $message; |
|
|
|
|
fwrite(self::$log, $message . PHP_EOL); |
|
|
|
|
|
|
|
|
|
if (self::$verboseLogEnabled) { |
|
|
|
|
echo $message . PHP_EOL; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -286,4 +300,15 @@ class Console
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Check if verbose logging is enabled |
|
|
|
|
* @return boolean |
|
|
|
|
*/ |
|
|
|
|
protected static function isVerboseLoggingEnabled() |
|
|
|
|
{ |
|
|
|
|
return self::$config->getParameter('verbose', false) |
|
|
|
|
|| self::$config->general('verbose_logging') |
|
|
|
|
|| self::$config->environmentConfig('verbose_logging', false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|