Documentation

LoggerFactory extends Horde_Core_Factory_Injector
in package

LoggerFactory builds modular loggers with multiple handlers

Table of Contents

Properties

$_injector  : Horde_Injector
The injector.
$conf  : State
$handlerFactory  : LogHandlerFactory
$handlers  : array<string|int, LogHandler>
Keyed list of handlers, to prevent doubles
$levels  : LogLevels
$logger  : Logger

Methods

__construct()  : mixed
Constructor
create()  : Logger
Create default logger
predefinedHandlers()  : array<string|int, LogHandler>
Integration point
_getDriverName()  : string
Return the classname of the driver to load.

Properties

$_injector

The injector.

protected Horde_Injector $_injector

$handlers

Keyed list of handlers, to prevent doubles

private array<string|int, LogHandler> $handlers = []

Methods

create()

Create default logger

public create(Injector $injector) : Logger

This creates a logger with

  • one handler based on the horde config or no handler,
  • canonic log levels,
  • the PSR-3 formatter and depending on options, another formatter,
  • a handler-level filter by loglevel

TODO: Mechanism to add specialised handlers without a configuration mess.

Parameters
$injector : Injector
Tags
throws
LogException
Return values
Logger

predefinedHandlers()

Integration point

public predefinedHandlers() : array<string|int, LogHandler>
Return values
array<string|int, LogHandler>

_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
throws
Horde_Exception
Return values
string

Classname.


        
On this page

Search results