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
|
|
@ -4,6 +4,8 @@ namespace PHPCensor\Console;
|
|||
|
||||
use b8\Config;
|
||||
use b8\Store\Factory;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Logger;
|
||||
use PHPCensor\Command\CreateAdminCommand;
|
||||
use PHPCensor\Command\CreateBuildCommand;
|
||||
use PHPCensor\Command\InstallCommand;
|
||||
|
|
@ -40,7 +42,13 @@ class Application extends BaseApplication
|
|||
{
|
||||
parent::__construct($name, $version);
|
||||
|
||||
$loggerConfig = LoggerConfig::newFromFile(APP_DIR . 'loggerconfig.php');
|
||||
$loggerConfig = new LoggerConfig([
|
||||
"_" => function() {
|
||||
return [
|
||||
new StreamHandler(RUNTIME_DIR . 'console.log', Logger::DEBUG),
|
||||
];
|
||||
}
|
||||
]);
|
||||
|
||||
$applicationConfig = Config::getInstance();
|
||||
$databaseSettings = $applicationConfig->get('b8.database', []);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue