From 2820f626744943e09e7eb8e983fba2d0fb7cb5e9 Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Sat, 26 Feb 2022 22:15:23 +0100 Subject: [PATCH] Fix StandardErrorLoggingHandler --- lib/SimpleSAML/Logger/StandardErrorLoggingHandler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/SimpleSAML/Logger/StandardErrorLoggingHandler.php b/lib/SimpleSAML/Logger/StandardErrorLoggingHandler.php index 1fd967955..37bf8e14f 100644 --- a/lib/SimpleSAML/Logger/StandardErrorLoggingHandler.php +++ b/lib/SimpleSAML/Logger/StandardErrorLoggingHandler.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace SimpleSAML\Logger; use SimpleSAML\Configuration; +use Symfony\Component\Filesystem\Filesystem; /** * A logging handler that outputs all messages to standard error. @@ -22,12 +23,15 @@ class StandardErrorLoggingHandler extends FileLoggingHandler */ public function __construct(Configuration $config) { + $this->fileSystem = new Filesystem(); + // Remove any non-printable characters before storing $this->processname = preg_replace( '/[\x00-\x1F\x7F\xA0]/u', '', $config->getOptionalString('logging.processname', 'SimpleSAMLphp') ); + $this->logFile = 'php://stderr'; } } -- GitLab