modifs.mineures sans commentaires
This commit is contained in:
parent
4698eac586
commit
888dd6be1a
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
## TOOD
|
## TOOD
|
||||||
|
|
||||||
* aliases critical(), important(), ... debug()
|
|
||||||
* [ ] ProxyMessenger, vers un ou plusieurs messengers
|
* [ ] ProxyMessenger, vers un ou plusieurs messengers
|
||||||
* [ ] support sous-système (instance locale ou globale)
|
* [ ] support sous-système (instance locale ou globale)
|
||||||
* [ ] msg::push() --> nouvelle instance globale
|
* [ ] msg::push() --> nouvelle instance globale
|
||||||
|
|
|
@ -63,5 +63,10 @@ abstract class _messenger {
|
||||||
function note($content, ?int $level=null): void { foreach (static::get_msgs() as $msg) { $msg->note($content, $level); } }
|
function note($content, ?int $level=null): void { foreach (static::get_msgs() as $msg) { $msg->note($content, $level); } }
|
||||||
function warn($content, ?int $level=null): void { foreach (static::get_msgs() as $msg) { $msg->warn($content, $level); } }
|
function warn($content, ?int $level=null): void { foreach (static::get_msgs() as $msg) { $msg->warn($content, $level); } }
|
||||||
function error($content, ?int $level=null): void { foreach (static::get_msgs() as $msg) { $msg->error($content, $level); } }
|
function error($content, ?int $level=null): void { foreach (static::get_msgs() as $msg) { $msg->error($content, $level); } }
|
||||||
|
function debug($content): void { self::info($content, self::DEBUG);}
|
||||||
|
function important($content): void { self::info($content, self::MAJOR);}
|
||||||
|
function attention($content): void { self::note($content, self::MAJOR);}
|
||||||
|
function critical_warn($content): void { self::warn($content, self::MAJOR);}
|
||||||
|
function critical_error($content): void { self::error($content, self::MAJOR);}
|
||||||
function end(bool $all=false): void { foreach (static::get_msgs() as $msg) { $msg->end($all); } }
|
function end(bool $all=false): void { foreach (static::get_msgs() as $msg) { $msg->end($all); } }
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,8 +39,8 @@ class StdMessenger implements IMessenger {
|
||||||
"section" => [true, "SECTION!", "===", "<color @b>=", "=</color>", "==="],
|
"section" => [true, "SECTION!", "===", "<color @b>=", "=</color>", "==="],
|
||||||
"title" => [false, "TITLE!", null, "<color @b>T", "</color>", "==="],
|
"title" => [false, "TITLE!", null, "<color @b>T", "</color>", "==="],
|
||||||
"desc" => ["DESC!", "<color @b>></color>", ""],
|
"desc" => ["DESC!", "<color @b>></color>", ""],
|
||||||
"error" => ["CRITICAL!", "<color @r>E!", "</color>"],
|
"error" => ["CRIT.ERROR!", "<color @r>E!", "</color>"],
|
||||||
"warn" => ["WARNING!", "<color @y>W!", "</color>"],
|
"warn" => ["CRIT.WARN!", "<color @y>W!", "</color>"],
|
||||||
"note" => ["ATTENTION!", "<color @g>N!", "</color>"],
|
"note" => ["ATTENTION!", "<color @g>N!", "</color>"],
|
||||||
"info" => ["IMPORTANT!", "<color @b>I!", "</color>"],
|
"info" => ["IMPORTANT!", "<color @b>I!", "</color>"],
|
||||||
"step" => ["*", "<color @w>.</color>", ""],
|
"step" => ["*", "<color @w>.</color>", ""],
|
||||||
|
@ -60,11 +60,11 @@ class StdMessenger implements IMessenger {
|
||||||
self::LEVEL_DEBUG => [
|
self::LEVEL_DEBUG => [
|
||||||
"section" => [true, "section", null, "<color @w>>>", "<<</color>", null],
|
"section" => [true, "section", null, "<color @w>>>", "<<</color>", null],
|
||||||
"title" => [false, "title", null, "<color b>t", "</color>", null],
|
"title" => [false, "title", null, "<color b>t", "</color>", null],
|
||||||
"desc" => [">", "<color b>></color>", ""],
|
"desc" => ["desc", "<color b>></color>", ""],
|
||||||
"error" => ["e", "<color r>e</color><color -r>", "</color>"],
|
"error" => ["debugE", "<color r>e</color><color -r>", "</color>"],
|
||||||
"warn" => ["w", "<color y>w</color><color -y>", "</color>"],
|
"warn" => ["debugW", "<color y>w</color><color -y>", "</color>"],
|
||||||
"note" => ["i", "<color b>i</color>", ""],
|
"note" => ["debugN", "<color b>i</color>", ""],
|
||||||
"info" => ["D", "<color @w>D</color><color w>", "</color>"],
|
"info" => ["debugI", "<color @w>D</color><color w>", "</color>"],
|
||||||
"step" => ["*", "<color @w>.</color>", ""],
|
"step" => ["*", "<color @w>.</color>", ""],
|
||||||
"print" => [null, null, null],
|
"print" => [null, null, null],
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue