diff --git a/logging/formatter.rst b/logging/formatter.rst index 737b0b86a5f..ffddbd1ed72 100644 --- a/logging/formatter.rst +++ b/logging/formatter.rst @@ -55,3 +55,17 @@ configure your handler to use it: ->formatter('monolog.formatter.json') ; }; + +Many built-in formatters are available in Monolog. A lot of them are declared as services +and can be used in the ``formatter`` option: + +* ``monolog.formatter.chrome_php``: formats a record according to the ChromePHP array format +* ``monolog.formatter.gelf_message``: serializes a format to GELF format +* ``monolog.formatter.html``: formats a record into an HTML table +* ``monolog.formatter.json``: serializes a record into a JSON object +* ``monolog.formatter.line``: formats a record into a one-line string +* ``monolog.formatter.loggly``: formats a record information into JSON in a format compatible with Loggly +* ``monolog.formatter.logstash``: serializes a record to Logstash Event Format +* ``monolog.formatter.normalizer``: normalizes a record to remove objects/resources so it's easier to dump to various targets +* ``monolog.formatter.scalar``: formats a record into an associative array of scalar (+ null) values (objects and arrays will be JSON encoded) +* ``monolog.formatter.wildfire``: serializes a record according to Wildfire's header requirements