45 private static $loggers = array();
59 if (isset(self::$loggers[
$name]) && !$overwrite) {
63 self::$loggers[
$name] = $logger;
73 if ($logger instanceof
Logger) {
74 $index = array_search($logger, self::$loggers,
true);
78 return isset(self::$loggers[$logger]);
89 if ($logger instanceof
Logger) {
90 if (
false !== ($idx = array_search($logger, self::$loggers,
true))) {
91 unset(self::$loggers[$idx]);
94 unset(self::$loggers[$logger]);
103 self::$loggers = array();
115 if (!isset(self::$loggers[
$name])) {
119 return self::$loggers[
$name];
132 return self::getInstance(
$name);
static getInstance($name)
Gets Logger instance from the registry.
static hasLogger($logger)
Checks if such logging channel exists by name or instance.
static addLogger(Logger $logger, $name=null, $overwrite=false)
Adds new logging channel to the registry.
static removeLogger($logger)
Removes instance from registry by name or instance.
static __callStatic($name, $arguments)
Gets Logger instance from the registry via static method call.
static clear()
Clears the registry.