ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Static Public Member Functions | |
static | addLogger (Logger $logger, $name=null, $overwrite=false) |
Adds new logging channel to the registry. More... | |
static | hasLogger ($logger) |
Checks if such logging channel exists by name or instance. More... | |
static | removeLogger ($logger) |
Removes instance from registry by name or instance. More... | |
static | clear () |
Clears the registry. More... | |
static | getInstance ($name) |
Gets Logger instance from the registry. More... | |
static | __callStatic ($name, $arguments) |
Gets Logger instance from the registry via static method call. More... | |
Static Private Attributes | |
static | $loggers = array() |
Monolog log registry.
Allows to get Logger
instances in the global scope via static method calls on this class.
$application = new Monolog('application'); $api = new Monolog('api');
Monolog::addLogger($application); Monolog::addLogger($api);
function testLogger() { Monolog::api()->addError('Sent to $api Logger instance'); Monolog::application()->addError('Sent to $application Logger instance'); }
Definition at line 38 of file Registry.php.
|
static |
Gets Logger instance from the registry via static method call.
string | $name | Name of the requested Logger instance |
array | $arguments | Arguments passed to static method call |
Definition at line 130 of file Registry.php.
References $name.
|
static |
Adds new logging channel to the registry.
Logger | $logger | Instance of the logging channel |
string | null | $name | Name of the logging channel ($logger->getName() by default) |
bool | $overwrite | Overwrite instance in the registry if the given name already exists? |
Definition at line 55 of file Registry.php.
References $name, and Monolog\Logger\getName().
|
static |
Clears the registry.
Definition at line 101 of file Registry.php.
|
static |
Gets Logger instance from the registry.
string | $name | Name of the requested Logger instance |
Definition at line 113 of file Registry.php.
References $name.
|
static |
Checks if such logging channel exists by name or instance.
string | Logger | $logger | Name or logger instance |
Definition at line 71 of file Registry.php.
References $index.
|
static |
Removes instance from registry by name or instance.
string | Logger | $logger | Name or logger instance |
Definition at line 87 of file Registry.php.
|
staticprivate |
Definition at line 45 of file Registry.php.