1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 09:36:11 +02:00

Add check for curl ext

This commit is contained in:
Jordi Boggiano
2013-11-14 20:15:52 +01:00
parent b793eccd76
commit 97ed5e1ea3

View File

@@ -27,6 +27,10 @@ class LogglyHandler extends AbstractProcessingHandler
public function __construct($token, $level = Logger::DEBUG, $bubble = true) public function __construct($token, $level = Logger::DEBUG, $bubble = true)
{ {
if (!extension_loaded('curl')) {
throw new \LogicException('The curl extension is needed to use the LogglyHandler');
}
$this->token = $token; $this->token = $token;
parent::__construct($level, $bubble); parent::__construct($level, $bubble);