mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
logging: console support/format for new log types
This commit is contained in:
parent
9d76d3f88a
commit
3f6593311b
2 changed files with 5 additions and 1 deletions
|
@ -128,9 +128,13 @@ class ConsoleOutput {
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected static $_styles = array(
|
protected static $_styles = array(
|
||||||
|
'emergency' => array('text' => 'red', 'underline' => true),
|
||||||
|
'alert' => array('text' => 'red', 'underline' => true),
|
||||||
|
'critical' => array('text' => 'red', 'underline' => true),
|
||||||
'error' => array('text' => 'red', 'underline' => true),
|
'error' => array('text' => 'red', 'underline' => true),
|
||||||
'warning' => array('text' => 'yellow'),
|
'warning' => array('text' => 'yellow'),
|
||||||
'info' => array('text' => 'cyan'),
|
'info' => array('text' => 'cyan'),
|
||||||
|
'debug' => array('text' => 'yellow'),
|
||||||
'success' => array('text' => 'green'),
|
'success' => array('text' => 'green'),
|
||||||
'comment' => array('text' => 'blue'),
|
'comment' => array('text' => 'blue'),
|
||||||
'question' => array('text' => "magenta"),
|
'question' => array('text' => "magenta"),
|
||||||
|
|
|
@ -175,7 +175,7 @@ class Shell extends Object {
|
||||||
}
|
}
|
||||||
CakeLog::config('stderr', array(
|
CakeLog::config('stderr', array(
|
||||||
'engine' => 'ConsoleLog',
|
'engine' => 'ConsoleLog',
|
||||||
'types' => array('error', 'warning'),
|
'types' => array('emergency', 'alert', 'critical', 'error', 'warning', 'debug'),
|
||||||
'stream' => $this->stderr,
|
'stream' => $this->stderr,
|
||||||
));
|
));
|
||||||
if ($this->stdin == null) {
|
if ($this->stdin == null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue