Fixed logging (Now logging autostarting without special loggerconfig.php). Issue #59.
This commit is contained in:
parent
5a761dcddb
commit
7e2f63142d
6 changed files with 9 additions and 95 deletions
|
|
@ -13,23 +13,6 @@ class LoggerConfig
|
|||
private $config;
|
||||
private $cache = [];
|
||||
|
||||
/**
|
||||
* The filepath is expected to return an array which will be
|
||||
* passed to the normal constructor.
|
||||
*
|
||||
* @param string $filePath
|
||||
* @return LoggerConfig
|
||||
*/
|
||||
public static function newFromFile($filePath)
|
||||
{
|
||||
if (file_exists($filePath)) {
|
||||
$configArray = require($filePath);
|
||||
} else {
|
||||
$configArray = [];
|
||||
}
|
||||
return new self($configArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* Each key of the array is the name of a logger. The value of
|
||||
* each key should be an array or a function that returns an
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue