From d949325c125ea61edde54060adfdfd1a3552ffbb Mon Sep 17 00:00:00 2001 From: Antoine Makdessi Date: Wed, 16 Mar 2022 18:03:33 +0100 Subject: [PATCH] [Logging] Document the Monolog `reset()` method for long running processes --- logging.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/logging.rst b/logging.rst index f25486c520d..e2472118192 100644 --- a/logging.rst +++ b/logging.rst @@ -367,6 +367,14 @@ information to your log entries. See :doc:`/logging/processors` for details. +Handling logs in long running processes +--------------------------------------- + +During long running processes, logs can be accumulated into Monolog and cause some buffer overflow, +memory increase or even non logical logs. +Monolog in-memory data can be cleared using the ``reset()`` method on a ``Monolog\Logger`` instance. +This should typically be called between every jobs/tasks that a long running process is working through. + Learn more ----------