From 0e007fad1885dfd4a88604b597a991e7c1b23c2d Mon Sep 17 00:00:00 2001 From: Jaime Perez Crespo <jaime.perez@uninett.no> Date: Thu, 31 Mar 2016 14:44:27 +0200 Subject: [PATCH] Add a new logger class that logs all messages to standard error. --- lib/SimpleSAML/Logger/StandardError.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lib/SimpleSAML/Logger/StandardError.php diff --git a/lib/SimpleSAML/Logger/StandardError.php b/lib/SimpleSAML/Logger/StandardError.php new file mode 100644 index 000000000..62eb8acc8 --- /dev/null +++ b/lib/SimpleSAML/Logger/StandardError.php @@ -0,0 +1,24 @@ +<?php + +namespace SimpleSAML\Logger; + +/** + * A logging handler that outputs all messages to standard error. + * + * @author Jaime Perez Crespo, UNINETT AS <jaime.perez@uninett.no> + * @package SimpleSAMLphp + */ +class StandardError extends \SimpleSAML_Logger_LoggingHandlerFile +{ + + /** + * StandardError constructor. + * + * It runs the parent constructor and sets the log file to be the standard error descriptor. + */ + public function __construct() + { + parent::__construct(); + $this->logFile = 'php://stderr'; + } +} -- GitLab