mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-15 04:46:49 +01:00
* [MOD] Improved logging when performing upgrades
* [MOD] Log to file is turned on when debug mode is active Signed-off-by: nuxsmin <nuxsmin@syspass.org>
This commit is contained in:
@@ -116,16 +116,20 @@ abstract class ModuleBase
|
||||
|
||||
/**
|
||||
* Initializes event handlers
|
||||
*
|
||||
* @throws \DI\DependencyException
|
||||
* @throws \DI\NotFoundException
|
||||
*/
|
||||
protected function initEventHandlers()
|
||||
{
|
||||
$eventDispatcher = $this->container->get(EventDispatcher::class);
|
||||
|
||||
if (DEBUG) {
|
||||
$eventDispatcher->attach($this->container->get(FileLogHandler::class));
|
||||
}
|
||||
|
||||
if ($this->configData->isLogEnabled()) {
|
||||
$eventDispatcher->attach($this->container->get(DatabaseLogHandler::class));
|
||||
if (DEBUG) {
|
||||
$eventDispatcher->attach($this->container->get(FileLogHandler::class));
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->configData->isMailEnabled()) {
|
||||
|
||||
Reference in New Issue
Block a user