mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-10 07:06:40 +02:00
unregisterLogger() method added, phpdoc typo
This commit is contained in:
@@ -132,15 +132,27 @@ class Logger implements LoggerInterface
|
|||||||
protected $processors;
|
protected $processors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers new Logger instance
|
* Registers new Logger instance
|
||||||
* @param string $name The logging channel name
|
* @param string $name The logging channel name
|
||||||
* @param Monolog\Logger $instance Instance to register
|
* @param Monolog\Logger $instance Instance to register
|
||||||
*/
|
*/
|
||||||
public static function registerLogger($name, Logger $instance)
|
public static function registerLogger($name, Logger $instance)
|
||||||
{
|
{
|
||||||
self::$loggerInstances[$name] = $instance;
|
self::$loggerInstances[$name] = $instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unregisters Logger instance
|
||||||
|
* @param string $name The logging channel name
|
||||||
|
*/
|
||||||
|
public static function unregisterLogger($name)
|
||||||
|
{
|
||||||
|
if(isset(self::$loggerInstances[$name])) {
|
||||||
|
self::$loggerInstances[$name] = null;
|
||||||
|
unset(self::$loggerInstances[$name]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets instance of requested logging channel
|
* Gets instance of requested logging channel
|
||||||
* @param string $name The logging channel name
|
* @param string $name The logging channel name
|
||||||
|
Reference in New Issue
Block a user