From 30e9169d5224c5daa28e070f0e6bfd12a260ba7d Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Fri, 25 Jul 2025 21:22:49 +0200 Subject: [PATCH] php: Recommend calling flush for long runnong CLI tasks --- platform-includes/logs/usage/php.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform-includes/logs/usage/php.mdx b/platform-includes/logs/usage/php.mdx index 3478465012309..0adbcdf4ecbb3 100644 --- a/platform-includes/logs/usage/php.mdx +++ b/platform-includes/logs/usage/php.mdx @@ -17,3 +17,6 @@ You can pass additional attributes directly to the logging functions. These prop // Somewhere at the end of your execution, you should flush the logger to send pending logs to Sentry. \Sentry\logger()->flush(); ``` + +If you are using logs in long running CLI tasks, we recommend periodically calling `\Sentry\logger()->flush()` to keep memory pressure low and avoid any logs being discarded to due size-limits. +