diff --git a/src/Fluent/Logger/FluentLogger.php b/src/Fluent/Logger/FluentLogger.php index 334e8b6..e30df55 100644 --- a/src/Fluent/Logger/FluentLogger.php +++ b/src/Fluent/Logger/FluentLogger.php @@ -272,8 +272,7 @@ protected function connect() ); if (!$socket) { - $errors = error_get_last(); - throw new \Exception($errors['message']); + throw new \Exception(sprintf('Error while trying to connect to fluentd: code %d - %s', $errno, $errstr)); } // set read / write timeout.