\Gishiki\CoreApplicationLoggerTrait

This is a working implementation of PSR-3 logger connections handler for the Application class.

Summary

Methods
Properties
Constants
getLoggerManager()
setDefaultLoggerName()
getDefaultLoggerName()
No public properties found
No constants found
No protected methods found
$loggersConnections
$defaultLoggerName
N/A
initializeLoggerHandler()
isInitializedLoggerHandler()
connectLogger()
No private properties found
N/A

Properties

$defaultLoggerName

$defaultLoggerName : string

Type

string — the name of the default logger to be used when logging an unhandled exception

Methods

getLoggerManager()

getLoggerManager() : \Gishiki\Logging\LoggerManager

Get the PSR-3 loggers manager used within the current application.

Returns

\Gishiki\Logging\LoggerManager

the collection of loggers

setDefaultLoggerName()

setDefaultLoggerName(string  $name) 

Set the name of the default logger.

Parameters

string $name

the name of the default connection

getDefaultLoggerName()

getDefaultLoggerName() : string

Get the name of the default logger.

Returns

string —

the name of the default logger

initializeLoggerHandler()

initializeLoggerHandler() 

Initialize the application internal logger handler

isInitializedLoggerHandler()

isInitializedLoggerHandler() : boolean

Check if the logger handler has been initialized.

Returns

boolean —

true if the logger handler is initialized

connectLogger()

connectLogger(array  $connections, string  $default) 

Prepare every logger instance setting the default one.

If the default logger name is given it will be set as the default one.

Parameters

array $connections

the array of connections

string $default

the name of the default connection