* [ADD] Added FileLogHandler to send events to a file

* [MOD] Code refactoring and minor bugfixes
This commit is contained in:
nuxsmin
2018-07-04 02:31:29 +02:00
parent 0bfebd636a
commit c60bf30523
5 changed files with 125 additions and 31 deletions

View File

@@ -30,7 +30,7 @@ use SP\Bootstrap;
use SP\Config\Config;
use SP\Core\Context\ContextInterface;
use SP\Core\Events\EventDispatcher;
use SP\Providers\Log\LogHandler;
use SP\Providers\Log\DatabaseLogHandler;
use SP\Providers\Log\RemoteSyslogHandler;
use SP\Providers\Log\SyslogHandler;
use SP\Providers\Mail\MailHandler;
@@ -118,7 +118,8 @@ abstract class ModuleBase
$eventDispatcher = $this->container->get(EventDispatcher::class);
if ($this->configData->isLogEnabled()) {
$eventDispatcher->attach($this->container->get(LogHandler::class));
$eventDispatcher->attach($this->container->get(DatabaseLogHandler::class));
// $eventDispatcher->attach($this->container->get(FileLogHandler::class));
}
if ($this->configData->isMailEnabled()) {