Skip to content

Added a note about log file sizes and the use of logrotate #5006

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 13, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cookbook/logging/monolog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,14 @@ Monolog allows you to process the record before logging it to add some
extra data. A processor can be applied for the whole handler stack or
only for a specific handler.

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

Beware that log file sizes can grow very rapidly, leading to disk space exhaustion.
This is specially true in the ``dev`` environment, where a simple request can
generate hundreds of log lines. Consider using tools like the ``logrotate``
Linux command to contain log files before they become a problem.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to rotate log files


A processor is simply a callable receiving the record as its first argument.
Processors are configured using the ``monolog.processor`` DIC tag. See the
:ref:`reference about it <dic_tags-monolog-processor>`.

Expand Down