Zend\Log\Writer\FingersCrossed
Buffers all events until the strategy determines to flush them.
Synopsis
class FingersCrossed
extends AbstractWriter
{
- // members
- protected WriterInterface $writer;
- protected WriterPluginManager $writerPlugins;
- protected bool $buffering;
- protected int $bufferSize;
- protected array $buffer;
- // Inherited members from AbstractWriter
- protected FilterPluginManager $filterPlugins;
- protected FormatterPluginManager $formatterPlugins;
- protected array $filters;
- protected FormatterInterface $formatter;
- protected bool $convertWriteErrorsToExceptions;
- protected bool $errorsToExceptionsConversionLevel;
- // methods
- public void __construct()
- public self setWriter()
- public WriterPluginManager getWriterPluginManager()
- public FingersCrossed setWriterPluginManager()
- public WriterInterface writerPlugin()
- public void write()
- protected bool isActivated()
- protected void doWrite()
- public void reset()
- public WriterInterface setFormatter()
- public void shutdown()
- // Inherited methods from AbstractWriter
- public Logger __construct()
- public AbstractWriter addFilter()
- public FilterPluginManager getFilterPluginManager()
- public self setFilterPluginManager()
- public FilterInterface filterPlugin()
- public FormatterPluginManager getFormatterPluginManager()
- public self setFormatterPluginManager()
- public FormatterInterface formatterPlugin()
- public void write()
- public self setFormatter()
- protected FormatterInterface getFormatter()
- protected bool hasFormatter()
- public void setConvertWriteErrorsToExceptions()
- public void shutdown()
- protected abstract void doWrite()
Hierarchy
Extends
Members
protected
- $buffer
—
array
array of log events - $bufferSize
—
int
Oldest entries are removed from the buffer if bufferSize is reached. - $buffering
—
Zend\Log\Writer\bool
Flag if buffering is enabled - $convertWriteErrorsToExceptions
—
Zend\Log\Writer\bool
Use Zend\Stdlib\ErrorHandler to report errors during calls to write - $errorsToExceptionsConversionLevel
—
Zend\Log\Writer\bool
Error level passed to Zend\Stdlib\ErrorHandler::start for errors reported during calls to write - $filterPlugins
—
Zend\Log\Writer\FilterPluginManager
Filter plugins - $filters
—
array
Filter chain - $formatter
—
Zend\Log\Writer\Formatter\FormatterInterface
Formats the log message before writing - $formatterPlugins
—
Zend\Log\Writer\FormatterPluginManager
Formatter plugins - $writer
—
Zend\Log\Writer\WriterInterface
The wrapped writer - $writerPlugins
—
Zend\Log\WriterPluginManager
Writer plugins
Methods
protected
- doWrite() — Write message to buffer or delegate event data to the wrapped writer
- isActivated() — Check if buffered data should be flushed
public
- __construct() — Constructor
- getWriterPluginManager() — Get writer plugin manager
- reset() — Resets the state of the handler.
- setFormatter() — Stub in accordance to parent method signature.
- setWriter() — Set a new writer
- setWriterPluginManager() — Set writer plugin manager
- shutdown() — Record shutdown
- write() — Log a message to this writer.
- writerPlugin() — Get writer instance
Inherited from Zend\Log\Writer\AbstractWriter
protected
- doWrite() — Write a message to the log
- getFormatter() — Get formatter
- hasFormatter() — Check if the writer has a formatter
public
- addFilter() — Add a filter specific to this writer.
- filterPlugin() — Get filter instance
- formatterPlugin() — Get formatter instance
- getFilterPluginManager() — Get filter plugin manager
- getFormatterPluginManager() — Get formatter plugin manager
- setConvertWriteErrorsToExceptions() — Set convert write errors to exception flag
- setFilterPluginManager() — Set filter plugin manager
- setFormatter() — Set a new formatter for this writer
- setFormatterPluginManager() — Set formatter plugin manager
- shutdown() — Perform shutdown activities such as closing open resources
- write() — Log a message to this writer.