Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated README to document all existing handlers

  • Loading branch information...
commit 580df22f5bf6e7641bc4df9bc70aa19d82e8315d 1 parent ffbb7b8
@Seldaek authored
Showing with 15 additions and 3 deletions.
  1. +15 −3 README.mdown
View
18 README.mdown
@@ -28,11 +28,23 @@ Each Handler also has a Formatter, a default one with settings that make sense w
Custom severity levels are not available. Only six levels (debug, info, warning, error, critical, alert) are present for basic filtering purposes, but for sorting and other use cases that would require flexibility, you should add Processors to the Logger that can add extra information (tags, user ip, ..) to the records before they are handled.
-Notable Features (non-exhaustive and incomplete)
-------------------------------------------------
+Handlers
+--------
-- _FingersCrossedHandler_: A very interesting handler. It takes a logger as parameter and will accumulate log records of all levels until a record exceeds the defined severity level. At which point it delivers all records, including those of lower severity, to the handler it wraps. This means that until an error actually happens you will not see anything in your logs, but when it happens you will have the full information, including debug and info records. This provides you with the info you need, only when you need it.
+- _StreamHandler_: Logs records into any php stream, use this for log files.
+- _RotatingFileHandler_: Logs records to a file and creates one logfile per day. It will also delete files older than $maxFiles. You should use [logrotate](http://linuxcommand.org/man_pages/logrotate8.html) for high profile setups though, this is just meant as a quick and dirty solution.
- _FirePHPHandler_: Handler for [FirePHP](http://www.firephp.org/), providing inline `console` messages within [FireBug](http://getfirebug.com/).
+- _NativeMailHandler_: Sends emails using PHP's mail() function.
+- _SwiftMailerHandler_: Sends emails using a SwiftMailer instance.
+- _SyslogHandler_: Logs records to the syslog.
+
+Wrappers / Special Handlers
+---------------------------
+
+- _FingersCrossedHandler_: A very interesting wrapper. It takes a logger as parameter and will accumulate log records of all levels until a record exceeds the defined severity level. At which point it delivers all records, including those of lower severity, to the handler it wraps. This means that until an error actually happens you will not see anything in your logs, but when it happens you will have the full information, including debug and info records. This provides you with all the information you need, but only when you need it.
+- _NullHandler_: Any record it can handle will be thrown away. This can be used to put on top of an existing handler stack to disable it temporarily.
+- _BufferHandler_: This handler will buffer all the log records it receives until close() is called at which point it will call handleBatch() on the handler it wraps with all the log messages at once. This is very useful to send an email with all records at once for example instead of having one mail for every log record.
+- _TestHandler_: Used for testing, it records everything that is sent to it and has accessors to read out the information.
Requirements
------------
Please sign in to comment.
Something went wrong with that request. Please try again.