Class Logger

Summary

Fully Qualified Name: Zend\Log\Logger
Implements: LoggerInterface

Description

Logging messages with a stack of backends

Methods

Name Description Defined By
__construct() Constructor Logger
__destruct() Shutdown all writers Logger
addProcessor() Add a processor to a logger Logger
addWriter() Add a writer to a logger Logger
alert() Logger
crit() Logger
debug() Logger
emerg() Logger
err() Logger
getProcessorPluginManager() Get processor plugin manager Logger
getProcessors() Get processors Logger
getWriterPluginManager() Get writer plugin manager Logger
getWriters() Get writers Logger
info() Logger
log() Add a message as a log entry Logger
notice() Logger
processorPlugin() Get processor instance Logger
registerErrorHandler() Register logging system as an error handler to log PHP errors Logger
registerExceptionHandler() Register logging system as an exception handler to log PHP exceptions Logger
registerFatalErrorShutdownFunction() Register a shutdown handler to log fatal errors Logger
setProcessorPluginManager() Set processor plugin manager Logger
setWriterPluginManager() Set writer plugin manager Logger
setWriters() Set the writers Logger
unregisterErrorHandler() Unregister error handler Logger
unregisterExceptionHandler() Unregister exception handler Logger
warn() Logger
writerPlugin() Get writer instance Logger

Method Details

__construct()

Constructor

Set options for a logger. Accepted options are:

Parameter Name Type Description
$options array|\Traversable

Returns: \Logger

__destruct()

Shutdown all writers

Returns: void

addProcessor()

Add a processor to a logger

Parameter Name Type Description
$processor string|\Processor\ProcessorInterface
$priority int
$options array|null

Returns: \Logger

addWriter()

Add a writer to a logger

Parameter Name Type Description
$writer string|\Writer\WriterInterface
$priority int
$options array|null

Returns: \Logger

alert()

Parameter Name Type Description
$message string
$extra array|\Traversable

Returns: \Logger

crit()

Parameter Name Type Description
$message string
$extra array|\Traversable

Returns: \Logger

debug()

Parameter Name Type Description
$message string
$extra array|\Traversable

Returns: \Logger

emerg()

Parameter Name Type Description
$message string
$extra array|\Traversable

Returns: \Logger

err()

Parameter Name Type Description
$message string
$extra array|\Traversable

Returns: \Logger

getProcessorPluginManager()

Get processor plugin manager

Returns: \ProcessorPluginManager

getProcessors()

Get processors

Returns: \SplPriorityQueue

getWriterPluginManager()

Get writer plugin manager

Returns: \WriterPluginManager

getWriters()

Get writers

Returns: \SplPriorityQueue

info()

Parameter Name Type Description
$message string
$extra array|\Traversable

Returns: \Logger

log()

Add a message as a log entry

Parameter Name Type Description
$priority int
$message mixed
$extra array|\Traversable

Returns: \Logger

notice()

Parameter Name Type Description
$message string
$extra array|\Traversable

Returns: \Logger

processorPlugin()

Get processor instance

Parameter Name Type Description
$name string
$options array|null

Returns: \Processor\ProcessorInterface

registerErrorHandler()

Register logging system as an error handler to log PHP errors

Parameter Name Type Description
$logger \Logger
$continueNativeHandler bool

Returns: mixed Returns result of set_error_handler

registerExceptionHandler()

Register logging system as an exception handler to log PHP exceptions

Parameter Name Type Description
$logger \Logger

Returns: bool

registerFatalErrorShutdownFunction()

Register a shutdown handler to log fatal errors

Parameter Name Type Description
$logger \Logger

Returns: bool

setProcessorPluginManager()

Set processor plugin manager

Parameter Name Type Description
$plugins string|\ProcessorPluginManager

Returns: \Logger

setWriterPluginManager()

Set writer plugin manager

Parameter Name Type Description
$writerPlugins \WriterPluginManager

Returns: \Logger

setWriters()

Set the writers

Parameter Name Type Description
$writers \SplPriorityQueue

Returns: \Logger

unregisterErrorHandler()

Unregister error handler

Returns:

unregisterExceptionHandler()

Unregister exception handler

Returns:

warn()

Parameter Name Type Description
$message string
$extra array|\Traversable

Returns: \Logger

writerPlugin()

Get writer instance

Parameter Name Type Description
$name string
$options array|null

Returns: \Writer\WriterInterface

Top