Zend Framework
3.0
|
Logging messages with a stack of backends. More...
Public Member Functions | |
__construct ($options=null) | |
Constructor. | |
__destruct () | |
Shutdown all writers. | |
getWriterPluginManager () | |
Get writer plugin manager. | |
setWriterPluginManager (WriterPluginManager $writerPlugins) | |
Set writer plugin manager. | |
writerPlugin ($name, array $options=null) | |
Get writer instance. | |
addWriter ($writer, $priority=1, array $options=null) | |
Add a writer to a logger. | |
getWriters () | |
Get writers. | |
setWriters (SplPriorityQueue $writers) | |
Set the writers. | |
getProcessorPluginManager () | |
Get processor plugin manager. | |
setProcessorPluginManager ($plugins) | |
Set processor plugin manager. | |
processorPlugin ($name, array $options=null) | |
Get processor instance. | |
addProcessor ($processor, $priority=1, array $options=null) | |
Add a processor to a logger. | |
getProcessors () | |
Get processors. | |
log ($priority, $message, $extra=[]) | |
Add a message as a log entry. | |
emerg ($message, $extra=[]) | |
alert ($message, $extra=[]) | |
crit ($message, $extra=[]) | |
err ($message, $extra=[]) | |
warn ($message, $extra=[]) | |
notice ($message, $extra=[]) | |
info ($message, $extra=[]) | |
debug ($message, $extra=[]) | |
Static Public Member Functions | |
static | registerErrorHandler (Logger $logger, $continueNativeHandler=false) |
Register logging system as an error handler to log PHP errors. | |
static | unregisterErrorHandler () |
Unregister error handler. | |
static | registerFatalErrorShutdownFunction (Logger $logger) |
Register a shutdown handler to log fatal errors. | |
static | registerExceptionHandler (Logger $logger) |
Register logging system as an exception handler to log PHP exceptions. | |
static | unregisterExceptionHandler () |
Unregister exception handler. | |
Public Attributes | |
const | EMERG = 0 |
int defined from the BSD Syslog message severities http://tools.ietf.org/html/rfc3164 | |
const | ALERT = 1 |
const | CRIT = 2 |
const | ERR = 3 |
const | WARN = 4 |
const | NOTICE = 5 |
const | INFO = 6 |
const | DEBUG = 7 |
Static Public Attributes | |
static | $errorPriorityMap |
static | E_USER_NOTICE |
Protected Attributes | |
$priorities | |
$writers | |
$processors | |
$writerPlugins | |
$processorPlugins | |
Static Protected Attributes | |
static | $registeredErrorHandler = false |
static | $registeredFatalErrorShutdownFunction = false |
static | $registeredExceptionHandler = false |
Logging messages with a stack of backends.
__construct | ( | $options = null | ) |
Constructor.
Set options for a logger. Accepted options are:
array | Traversable | $options |
Exception\InvalidArgumentException |
__destruct | ( | ) |
Shutdown all writers.
addProcessor | ( | $processor, | |
$priority = 1 , |
|||
array | $options = null |
||
) |
Add a processor to a logger.
string | Processor\ProcessorInterface | $processor | |
int | $priority | |
array | null | $options |
Exception\InvalidArgumentException |
addWriter | ( | $writer, | |
$priority = 1 , |
|||
array | $options = null |
||
) |
Add a writer to a logger.
string | Writer\WriterInterface | $writer | |
int | $priority | |
array | null | $options |
Exception\InvalidArgumentException |
alert | ( | $message, | |
$extra = [] |
|||
) |
crit | ( | $message, | |
$extra = [] |
|||
) |
debug | ( | $message, | |
$extra = [] |
|||
) |
emerg | ( | $message, | |
$extra = [] |
|||
) |
err | ( | $message, | |
$extra = [] |
|||
) |
getProcessorPluginManager | ( | ) |
Get processor plugin manager.
getProcessors | ( | ) |
Get processors.
getWriterPluginManager | ( | ) |
Get writer plugin manager.
getWriters | ( | ) |
Get writers.
info | ( | $message, | |
$extra = [] |
|||
) |
log | ( | $priority, | |
$message, | |||
$extra = [] |
|||
) |
Add a message as a log entry.
int | $priority | |
mixed | $message | |
array | Traversable | $extra |
Exception\InvalidArgumentException | if message can't be cast to string |
Exception\InvalidArgumentException | if extra can't be iterated over |
Exception\RuntimeException | if no log writer specified |
notice | ( | $message, | |
$extra = [] |
|||
) |
processorPlugin | ( | $name, | |
array | $options = null |
||
) |
|
static |
Register logging system as an error handler to log PHP errors.
|
static |
Register logging system as an exception handler to log PHP exceptions.
|
static |
Register a shutdown handler to log fatal errors.
setProcessorPluginManager | ( | $plugins | ) |
Set processor plugin manager.
string | ProcessorPluginManager | $plugins |
Exception\InvalidArgumentException |
setWriterPluginManager | ( | WriterPluginManager | $writerPlugins | ) |
setWriters | ( | SplPriorityQueue | $writers | ) |
Set the writers.
SplPriorityQueue | $writers |
Exception\InvalidArgumentException |
|
static |
Unregister error handler.
|
static |
Unregister exception handler.
warn | ( | $message, | |
$extra = [] |
|||
) |
writerPlugin | ( | $name, | |
array | $options = null |
||
) |
|
static |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
const ALERT = 1 |
const CRIT = 2 |
const DEBUG = 7 |
|
static |
const EMERG = 0 |
int defined from the BSD Syslog message severities http://tools.ietf.org/html/rfc3164
const ERR = 3 |
const INFO = 6 |
const NOTICE = 5 |
const WARN = 4 |