Skip to content
Snippets Groups Projects
Commit 2820f626 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fix StandardErrorLoggingHandler

parent 76a04ac4
No related branches found
No related tags found
No related merge requests found
......@@ -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';
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment