log ok
This commit is contained in:
parent
cbae16c6a4
commit
1691ddf3ee
@ -106,12 +106,19 @@ class QueryList
|
|||||||
*/
|
*/
|
||||||
public static function setLog($handler)
|
public static function setLog($handler)
|
||||||
{
|
{
|
||||||
if(is_string($handler))
|
if(class_exists(Logger::class))
|
||||||
{
|
{
|
||||||
$handler = new StreamHandler($handler,Logger::INFO);
|
if(is_string($handler))
|
||||||
}
|
{
|
||||||
self::$logger = new Logger('QueryList');
|
$handler = new StreamHandler($handler,Logger::INFO);
|
||||||
self::$logger->pushHandler($handler);
|
}
|
||||||
|
self::$logger = new Logger('QueryList');
|
||||||
|
self::$logger->pushHandler($handler);
|
||||||
|
}else{
|
||||||
|
throw new Exception("You need to install the package [monolog/monolog]");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user