/**
* Register a logger to the registry
*
* @param string $key The service key to be registered
* @param string $class The class name of the logger
* @param boolean $replace Flag indicating the service key may replace an existing definition
*
* @return void
*
* @since 4.0.0
*/
public function registerLogger(string $key, string $class, bool $replace = false)
{
// Automatically instantiate the singleton object if not already done.
if (empty(static::$instance)) {
static::setInstance(new static());
}
static::$instance->loggerRegistry->register($key, $class, $replace);
}