LoggerRegistry

Service registry for loggers

final
since

4.0.0

Methods

getLoggerClass

Get the logger class for a given key

getLoggerClass(string $key) : string
since

4.0.0

throws

\InvalidArgumentException

Arguments

$key

stringThe key to look up

Response

string

hasLogger

Check if the registry has a logger for the given key

hasLogger(string $key) : boolean
since

4.0.0

Arguments

$key

stringThe key to look up

Response

boolean

register

Register a logger

register(string $key, string $class, boolean $replace = false) : void
since

4.0.0

Arguments

$key

stringThe service key to be registered

$class

stringThe class name of the logger

$replace

booleanFlag indicating the service key may replace an existing definition

Properties

loggerMap

Array holding the registered services

since

4.0.0

Type(s)

array<mixed,string>