class PsrLoggerFactory implements PsrLoggerFactoryInterface (View source)

This actually creates a logger from the Neos.Log package.

It is no dependency of Neos.Flow but a suggestion. So IF you use the default logging Neos.Log needs to be installed.

Properties

protected LoggerInterface[] $instances
protected array $configuration

Methods

__construct(array $configuration = [])

PsrLoggerFactory constructor.

LoggerInterface
get(string $identifier)

Get the logger configured with given identifier.

create(array $configuration)

Create a new instance of this PsrLoggerFactory

array
instantiateBackends(array $configuration)

Instantiate all configured backends

instantiateBackend(string $class, array $options = [])

Instantiate a backend based on configuration.

Details

__construct(array $configuration = [])

PsrLoggerFactory constructor.

Parameters

array $configuration

LoggerInterface get(string $identifier)

Get the logger configured with given identifier.

This implementation treats the logger as singleton.

Parameters

string $identifier

A name for the logger. Factories MAY decide to treat a logger a singleton and return

Return Value

LoggerInterface

Exceptions

Exception

static PsrLoggerFactoryInterface create(array $configuration)

Create a new instance of this PsrLoggerFactory

Parameters

array $configuration

Return Value

PsrLoggerFactoryInterface

protected array instantiateBackends(array $configuration)

Instantiate all configured backends

Parameters

array $configuration

Return Value

array

Exceptions

Exception

protected BackendInterface instantiateBackend(string $class, array $options = [])

Instantiate a backend based on configuration.

Parameters

string $class
array $options

Return Value

BackendInterface

Exceptions

Exception