refactor: standardize error message in mariadb.service.ts
Updated logging messages in MariaDB service file. Removed template literals in logging and replaced them with standard strings for consistency and readability. Made adjustments in connection error messages and query execution error messages.
This commit is contained in:
parent
8620ccb167
commit
f4c74b129a
@ -26,7 +26,7 @@ export class MariadbService {
|
||||
});
|
||||
this.Connection.connect((err) => {
|
||||
if (err) {
|
||||
this.logs.error(`Error connecting to MySQL:`, err);
|
||||
this.logs.error("Error connecting to MySQL:", err);
|
||||
}
|
||||
this.logs.debug("Connected to MariaDB", this.envs.get("MYSQL_DATABASE"));
|
||||
});
|
||||
@ -39,7 +39,7 @@ export class MariadbService {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.Connection.query(queryString, (err, results) => {
|
||||
if (err) {
|
||||
this.logs.error(`Error executing query:`, err);
|
||||
this.logs.error("Error executing query:", err);
|
||||
reject(err);
|
||||
} else {
|
||||
resolve(results);
|
||||
@ -76,7 +76,7 @@ export class MariadbService {
|
||||
`Action: ${data.actionName}`,
|
||||
);
|
||||
if (_id.length > 0) {
|
||||
this.logs.trace(`Id post-pushed in factorized data.`, _id);
|
||||
this.logs.trace("Id post-pushed in factorized data.", _id);
|
||||
values.push(_id);
|
||||
_sqlQueryKeys.push("id");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user