From 00b7575c89815aa218e7e3ed3d61b25ee65f244f Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Tue, 3 Jan 2023 19:03:57 +0100 Subject: perf(logging): Return early when log level does not match before serializing an exception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Support/CrashReport/Registry.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/private/Support') diff --git a/lib/private/Support/CrashReport/Registry.php b/lib/private/Support/CrashReport/Registry.php index 472f39c2884..f5457f60ad4 100644 --- a/lib/private/Support/CrashReport/Registry.php +++ b/lib/private/Support/CrashReport/Registry.php @@ -147,4 +147,8 @@ class Registry implements IRegistry { } } } + + public function hasReporters(): bool { + return !empty($this->lazyReporters) || !empty($this->reporters); + } } -- cgit v1.2.3