Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1c730a4

Browse filesBrowse files
[Monolog] List available built-in formatters
1 parent 138546c commit 1c730a4
Copy full SHA for 1c730a4

File tree

Expand file treeCollapse file tree

1 file changed

+14
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-0
lines changed

‎logging/formatter.rst

Copy file name to clipboardExpand all lines: logging/formatter.rst
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,17 @@ configure your handler to use it:
5555
->formatter('monolog.formatter.json')
5656
;
5757
};
58+
59+
Many built-in formatters are available in Monolog. A lot of them are declared as services
60+
and can be used in the ``formatter`` option:
61+
62+
* ``monolog.formatter.chrome_php``: formats a record according to the ChromePHP array format
63+
* ``monolog.formatter.gelf_message``: serializes a format to GELF format
64+
* ``monolog.formatter.html``: formats a record into an HTML table
65+
* ``monolog.formatter.json``: serializes a record into a JSON object
66+
* ``monolog.formatter.line``: formats a record into a one-line string
67+
* ``monolog.formatter.loggly``: formats a record information into JSON in a format compatible with Loggly
68+
* ``monolog.formatter.logstash``: serializes a record to Logstash Event Format
69+
* ``monolog.formatter.normalizer``: normalizes a record to remove objects/resources so it's easier to dump to various targets
70+
* ``monolog.formatter.scalar``: formats a record into an associative array of scalar (+ null) values (objects and arrays will be JSON encoded)
71+
* ``monolog.formatter.wildfire``: serializes a record according to Wildfire's header requirements

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.