LoggerFactory
in package
implements
FactoryInterface
Factory for instantiating Logger
Tags
Interfaces, Classes, Traits and Enums
- FactoryInterface
Table of Contents
- __invoke() : object
- Create an object
- addDbWriters() : void
- Configure database writers.
- addDebugWriter() : void
- Add the standard debug stream writer.
- addEmailWriters() : void
- Configure email writers.
- addFileWriters() : void
- Configure File writers.
- addOffice365Writers() : void
- Configure Office365 writers.
- addSlackWriters() : void
- Configure Slack writers.
- addWriters() : void
- Applies an array of filters to a writer
- configureLogger() : void
- Set configuration
- getProxyClassName() : string
- Get proxy class to instantiate from the requested class name
- hasDynamicDebug() : bool
- Is dynamic debug mode enabled?
Methods
__invoke()
Create an object
public
__invoke(ContainerInterface $container, string $requestedName[, null|array<string|int, mixed> $options = null ]) : object
Parameters
- $container : ContainerInterface
-
Service manager
- $requestedName : string
-
Service being created
- $options : null|array<string|int, mixed> = null
-
Extra options (optional)
Tags
Return values
object —addDbWriters()
Configure database writers.
protected
addDbWriters(Logger $logger, ContainerInterface $container, string $config) : void
Parameters
- $logger : Logger
-
Logger object
- $container : ContainerInterface
-
Service manager
- $config : string
-
Configuration
Return values
void —addDebugWriter()
Add the standard debug stream writer.
protected
addDebugWriter(Logger $logger, bool|int $debug) : void
Parameters
- $logger : Logger
-
Logger object
- $debug : bool|int
-
Debug mode/level
Return values
void —addEmailWriters()
Configure email writers.
protected
addEmailWriters(Logger $logger, ContainerInterface $container, Config $config) : void
Parameters
- $logger : Logger
-
Logger object
- $container : ContainerInterface
-
Service manager
- $config : Config
-
Configuration
Return values
void —addFileWriters()
Configure File writers.
protected
addFileWriters(Logger $logger, string $config) : void
Parameters
- $logger : Logger
-
Logger object
- $config : string
-
Configuration
Return values
void —addOffice365Writers()
Configure Office365 writers.
protected
addOffice365Writers(Logger $logger, ContainerInterface $container, Config $config) : void
Parameters
- $logger : Logger
-
Logger object
- $container : ContainerInterface
-
Service manager
- $config : Config
-
Configuration
Return values
void —addSlackWriters()
Configure Slack writers.
protected
addSlackWriters(Logger $logger, ContainerInterface $container, Config $config) : void
Parameters
- $logger : Logger
-
Logger object
- $container : ContainerInterface
-
Service manager
- $config : Config
-
Configuration
Return values
void —addWriters()
Applies an array of filters to a writer
protected
addWriters(Logger $logger, WriterInterface $writer, string|array<string|int, mixed> $filters) : void
Filter keys: alert, error, notice, debug
Parameters
- $logger : Logger
-
Logger object
- $writer : WriterInterface
-
The writer to apply the filters to
- $filters : string|array<string|int, mixed>
-
An array or comma-separated string of logging levels
Return values
void —configureLogger()
Set configuration
protected
configureLogger(ContainerInterface $container, Logger $logger) : void
Parameters
- $container : ContainerInterface
-
Service manager
- $logger : Logger
-
Logger to configure
Return values
void —getProxyClassName()
Get proxy class to instantiate from the requested class name
protected
getProxyClassName(string $requestedName) : string
Parameters
- $requestedName : string
-
Service being created
Return values
string —hasDynamicDebug()
Is dynamic debug mode enabled?
protected
hasDynamicDebug(ContainerInterface $container) : bool
Parameters
- $container : ContainerInterface
-
Service manager