From b52d4af82b7ca88b2e1b547a3042629d58217a96 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 18 Feb 2015 15:54:02 +0100 Subject: [PATCH 1/3] Added a note about log file sizes and the use of logrotate --- cookbook/logging/monolog.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cookbook/logging/monolog.rst b/cookbook/logging/monolog.rst index e50c520159d..78ad77e38b2 100644 --- a/cookbook/logging/monolog.rst +++ b/cookbook/logging/monolog.rst @@ -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. + +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 `. From 472c803e380de38c4a4d878054dc9aadaac731d5 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 18 Feb 2015 22:15:30 +0100 Subject: [PATCH 2/3] Minor rewording --- cookbook/logging/monolog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/logging/monolog.rst b/cookbook/logging/monolog.rst index 78ad77e38b2..66c127a38ca 100644 --- a/cookbook/logging/monolog.rst +++ b/cookbook/logging/monolog.rst @@ -234,7 +234,7 @@ only for a specific handler. 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. + Linux command to rotate log files before they become a problem. A processor is simply a callable receiving the record as its first argument. Processors are configured using the ``monolog.processor`` DIC tag. See the From 2d23a8d8eb16fda5c245408e6787235abde7f13a Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 21 Feb 2015 22:35:36 +0100 Subject: [PATCH 3/3] Linked "logrotate" to its official website --- cookbook/logging/monolog.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cookbook/logging/monolog.rst b/cookbook/logging/monolog.rst index 66c127a38ca..d32697bbc01 100644 --- a/cookbook/logging/monolog.rst +++ b/cookbook/logging/monolog.rst @@ -233,7 +233,7 @@ only for a specific handler. 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`` + generate hundreds of log lines. Consider using tools like the `logrotate`_ Linux command to rotate log files before they become a problem. A processor is simply a callable receiving the record as its first argument. @@ -479,4 +479,5 @@ the ``monolog.processor`` tag: ->addArgument(new Reference('session')) ->addTag('monolog.processor', array('method' => 'processRecord', 'channel' => 'main')); -.. _Monolog: https://github.com/Seldaek/monolog +.. _`Monolog`: https://github.com/Seldaek/monolog +.. _`logrotate`: https://fedorahosted.org/logrotate/