\Gishiki\LoggingLoggerManager

An helper class for managing monolog logger instances.

Summary

Methods
Properties
Constants
isConnected()
connect()
retrieve()
No public properties found
No constants found
No protected methods found
$connections
N/A
No private methods found
No private properties found
N/A

Properties

$connections

$connections : array

Type

array — the list of logger instances as an associative array

Methods

isConnected()

isConnected(string  $name) : boolean

Check if a logger with the given name exists.

Parameters

string $name

the connection name

Throws

\InvalidArgumentException

invalid name

Returns

boolean —

true only if the logger exists

connect()

connect(string  $name, array  $details) : \Monolog\Logger

Create a new logger instance.

Parameters

string $name

the connection name

array $details

an array containing sub-arrays of connection details

Throws

\InvalidArgumentException

invalid name or connection details

Returns

\Monolog\Logger —

the new logger instance

retrieve()

retrieve(string|null  $name) : \Monolog\Logger

Retrieve the PSR-3 logger instance with the given name

Parameters

string|null $name

the name of the logger instance or NULL for the default one

Throws

\InvalidArgumentException

invalid name or inexistent logger instance

Returns

\Monolog\Logger —

the logger instance