class LoggerService extends Service

Logger service.

Properties

protected Application $app Application. from Service
protected Container $container Container. from Service
protected Config $config Config. from Service

Methods

__construct(Application $app, Container $container, Config $config)

Constructor.

from Service
register()

Registers the service.

array|null
getUserContext()

Get information about the current user.

array
getContext()

Get global logger context.

string
getStoragePath()

Returns the storage path.

StreamHandler
getStreamHandler()

Returns a stream handler.

SyslogHandler
getSyslogHandler()

Returns a syslog handler.

ErrorLogHandler
getErrorLogHandler()

Returns a error log handler.

HandlerInterface
getHandler(string $handler)

Returns a log handler.

Details

in Service at line 47
__construct(Application $app, Container $container, Config $config)

Constructor.

Parameters

Application $app Application
Container $container Container
Config $config Config

at line 135
register()

Registers the service.

at line 33
protected array|null getUserContext()

Get information about the current user.

Return Value

array|null

at line 61
protected array getContext()

Get global logger context.

Return Value

array

at line 78
protected string getStoragePath()

Returns the storage path.

Return Value

string

at line 88
protected StreamHandler getStreamHandler()

Returns a stream handler.

Return Value

StreamHandler

at line 106
protected SyslogHandler getSyslogHandler()

Returns a syslog handler.

Return Value

SyslogHandler

at line 116
protected ErrorLogHandler getErrorLogHandler()

Returns a error log handler.

Return Value

ErrorLogHandler

at line 127
protected HandlerInterface getHandler(string $handler)

Returns a log handler.

Parameters

string $handler Handler name

Return Value

HandlerInterface