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 1ee04ba

Browse filesBrowse files
committed
minor #5006 Added a note about log file sizes and the use of logrotate (javiereguiluz)
This PR was merged into the 2.3 branch. Discussion ---------- Added a note about log file sizes and the use of logrotate | Q | A | ------------- | --- | Doc fix? | no | New docs? | yes | Applies to | 2.3+ | Fixed tickets | #1161 Commits ------- 2d23a8d Linked "logrotate" to its official website 472c803 Minor rewording b52d4af Added a note about log file sizes and the use of logrotate
2 parents 3be0081 + 2d23a8d commit 1ee04ba
Copy full SHA for 1ee04ba

File tree

Expand file treeCollapse file tree

1 file changed

+9
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-2
lines changed

‎cookbook/logging/monolog.rst

Copy file name to clipboardExpand all lines: cookbook/logging/monolog.rst
+9-2Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,14 @@ Monolog allows you to process the record before logging it to add some
229229
extra data. A processor can be applied for the whole handler stack or
230230
only for a specific handler.
231231

232-
A processor is simply a callable receiving the record as its first argument.
232+
.. tip::
233233

234+
Beware that log file sizes can grow very rapidly, leading to disk space exhaustion.
235+
This is specially true in the ``dev`` environment, where a simple request can
236+
generate hundreds of log lines. Consider using tools like the `logrotate`_
237+
Linux command to rotate log files before they become a problem.
238+
239+
A processor is simply a callable receiving the record as its first argument.
234240
Processors are configured using the ``monolog.processor`` DIC tag. See the
235241
:ref:`reference about it <dic_tags-monolog-processor>`.
236242

@@ -473,4 +479,5 @@ the ``monolog.processor`` tag:
473479
->addArgument(new Reference('session'))
474480
->addTag('monolog.processor', array('method' => 'processRecord', 'channel' => 'main'));
475481
476-
.. _Monolog: https://github.com/Seldaek/monolog
482+
.. _`Monolog`: https://github.com/Seldaek/monolog
483+
.. _`logrotate`: https://fedorahosted.org/logrotate/

0 commit comments

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