mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 06:44:33 +02:00
Enhance logging
This commit is contained in:
parent
47b214ee1b
commit
167ff54947
@ -213,10 +213,14 @@ abstract class DbMigrationHook implements Countable
|
|||||||
$this->version = $migration->getVersion();
|
$this->version = $migration->getVersion();
|
||||||
unset($this->migrations[$migration->getVersion()]);
|
unset($this->migrations[$migration->getVersion()]);
|
||||||
|
|
||||||
Logger::info(
|
$data = [
|
||||||
"Applied %s pending migration version %s successfully",
|
'name' => $this->getName(),
|
||||||
$this->getName(),
|
'version' => $migration->getVersion()
|
||||||
$migration->getVersion()
|
];
|
||||||
|
AuditHook::logActivity(
|
||||||
|
'migrations',
|
||||||
|
'Migrated database schema of {{name}} to version {{version}}',
|
||||||
|
$data
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->storeState($migration->getVersion(), null);
|
$this->storeState($migration->getVersion(), null);
|
||||||
@ -225,7 +229,7 @@ abstract class DbMigrationHook implements Countable
|
|||||||
"Failed to apply %s pending migration version %s \n%s",
|
"Failed to apply %s pending migration version %s \n%s",
|
||||||
$this->getName(),
|
$this->getName(),
|
||||||
$migration->getVersion(),
|
$migration->getVersion(),
|
||||||
$e->getMessage()
|
$e
|
||||||
);
|
);
|
||||||
Logger::debug($e->getTraceAsString());
|
Logger::debug($e->getTraceAsString());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user