LogHandlerFactory
extends Horde_Core_Factory_Injector
in package
LogHandlerFactory builds individual LogHandlers
Table of Contents
Properties
- $_injector : Horde_Injector
- The injector.
- $conf : State
Methods
- __construct() : mixed
- Constructor
- create() : LogHandler
- Create default LogHandler
- createNullHandler() : NullHandler
- createStreamHandler() : StreamHandler
- createSyslogHandler() : SyslogHandler
- _getDriverName() : string
- Return the classname of the driver to load.
Properties
$_injector
The injector.
protected
Horde_Injector
$_injector
$conf
private
State
$conf
Methods
__construct()
Constructor
public
__construct(State $config) : mixed
Parameters
- $config : State
-
The conf.php values for the global log handler
create()
Create default LogHandler
public
create(Injector $injector) : LogHandler
This creates a LogHandler with configuration from conf.php
- the PSR-3 formatter and depending on options, another formatter,
- a handler-level filter by loglevel as the config suggests
TODO: Mechanism to add and expose custom handlers
Parameters
- $injector : Injector
Tags
Return values
LogHandlercreateNullHandler()
public
createNullHandler() : NullHandler
Return values
NullHandlercreateStreamHandler()
public
createStreamHandler(mixed $streamOrUrl[, string $mode = 'a+' ][, array<string|int, mixed> $formatters = null ][, array<string|int, mixed> $filters = [] ]) : StreamHandler
Parameters
- $streamOrUrl : mixed
- $mode : string = 'a+'
- $formatters : array<string|int, mixed> = null
- $filters : array<string|int, mixed> = []
Return values
StreamHandlercreateSyslogHandler()
public
createSyslogHandler(array<string|int, mixed> $formatters[, array<string|int, mixed> $filters = [] ]) : SyslogHandler
Parameters
- $formatters : array<string|int, mixed>
- $filters : array<string|int, mixed> = []
Return values
SyslogHandler_getDriverName()
Return the classname of the driver to load.
protected
_getDriverName(string $driver, string $base) : string
Parameters
- $driver : string
-
Driver name.
- $base : string
-
The base classname.
Tags
Return values
string —Classname.