From 39aeecefaeacb43b7315399f37aee63b34930ec1 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 26 May 2016 22:44:25 +0100 Subject: [PATCH] Add getter for the StreamHandler URL, fixes #797 --- src/Monolog/Handler/StreamHandler.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Monolog/Handler/StreamHandler.php b/src/Monolog/Handler/StreamHandler.php index ccf4a979..b084f1a7 100644 --- a/src/Monolog/Handler/StreamHandler.php +++ b/src/Monolog/Handler/StreamHandler.php @@ -75,6 +75,16 @@ class StreamHandler extends AbstractProcessingHandler return $this->stream; } + /** + * Return the stream URL if it was configured with a URL and not an active resource + * + * @return string|null + */ + public function getUrl() + { + return $this->url; + } + /** * {@inheritdoc} */