Since: 4.0.0

final class LoggerRegistry

Service registry for loggers

Methods

string
getLoggerClass(string $key)

Get the logger class for a given key

bool
hasLogger(string $key)

Check if the registry has a logger for the given key

void
register(string $key, string $class, bool $replace = false)

Register a logger

Details

string getLoggerClass(string $key)

Since: 4.0.0

Get the logger class for a given key

Parameters

string $key

The key to look up

Return Value

string

Exceptions

InvalidArgumentException

bool hasLogger(string $key)

Since: 4.0.0

Check if the registry has a logger for the given key

Parameters

string $key

The key to look up

Return Value

bool

void register(string $key, string $class, bool $replace = false)

Since: 4.0.0

Register a logger

Parameters

string $key

The service key to be registered

string $class

The class name of the logger

bool $replace

Flag indicating the service key may replace an existing definition

Return Value

void