summaryrefslogtreecommitdiffstats
path: root/lib/private/Setup/MySQL.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Setup/MySQL.php')
-rw-r--r--lib/private/Setup/MySQL.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/private/Setup/MySQL.php b/lib/private/Setup/MySQL.php
index 229d47160f5..c2b0cd8aaac 100644
--- a/lib/private/Setup/MySQL.php
+++ b/lib/private/Setup/MySQL.php
@@ -84,9 +84,8 @@ class MySQL extends AbstractDatabase {
$query = "CREATE DATABASE IF NOT EXISTS `$name` CHARACTER SET $characterSet COLLATE ${characterSet}_bin;";
$connection->executeUpdate($query);
} catch (\Exception $ex) {
- $this->logger->logException($ex, [
- 'message' => 'Database creation failed.',
- 'level' => ILogger::ERROR,
+ $this->logger->error('Database creation failed.', [
+ 'exception' => $ex,
'app' => 'mysql.setup',
]);
return;
@@ -97,9 +96,8 @@ class MySQL extends AbstractDatabase {
$query = "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `$name` . * TO '$user'";
$connection->executeUpdate($query);
} catch (\Exception $ex) {
- $this->logger->logException($ex, [
- 'message' => 'Could not automatically grant privileges, this can be ignored if database user already had privileges.',
- 'level' => ILogger::DEBUG,
+ $this->logger->debug('Could not automatically grant privileges, this can be ignored if database user already had privileges.', [
+ 'exception' => $ex,
'app' => 'mysql.setup',
]);
}
@@ -128,9 +126,8 @@ class MySQL extends AbstractDatabase {
$connection->executeUpdate($query);
}
} catch (\Exception $ex) {
- $this->logger->logException($ex, [
- 'message' => 'Database user creation failed.',
- 'level' => ILogger::ERROR,
+ $this->logger->error('Database user creation failed.',[
+ 'exception' => $ex,
'app' => 'mysql.setup',
]);
}