Skip to content

Commit

Permalink
Use logger instead of console
Browse files Browse the repository at this point in the history
  • Loading branch information
niwsa committed Jan 22, 2025
1 parent 7666c5c commit 17e3e4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions npm/src/db/sql/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class Sql implements DatabaseDriver {
}
break;
} catch (err) {
console.error(
this.logger.error(
`error in index namespace execution for engine: ${this.options.engine}, type: ${sqlType} err: ${err}`
);
await dbutils.sleep(1000);
Expand Down Expand Up @@ -144,7 +144,7 @@ class Sql implements DatabaseDriver {

this.timerId = setTimeout(this.ttlCleanup, this.options.ttl! * 1000);
} else {
console.warn(
this.logger.warn(
`Warning: ttl cleanup not enabled in ${sqlType} with engine ${this.options.engine}, set both "ttl" and "cleanupLimit" options to enable it!`
);
}
Expand Down Expand Up @@ -176,7 +176,7 @@ class Sql implements DatabaseDriver {
}
}
} catch (err) {
console.error('Error running indexNamespace:', err);
this.logger.error('Error running indexNamespace:', err);
}
}

Expand Down

0 comments on commit 17e3e4c

Please sign in to comment.