Skip to content

Commit

Permalink
use logger for logging instead of console
Browse files Browse the repository at this point in the history
  • Loading branch information
ryukaizen committed Mar 8, 2024
1 parent 442c095 commit 6c9b542
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/database/rules_sql.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { prisma } from "./index"
import { logger } from "../logger";

export async function get_rules(chatId: string) {
let rules = await prisma.rules.findUnique({
Expand Down Expand Up @@ -26,7 +27,7 @@ export async function set_rules(chatId: string, rulesText: string) {
return true;
}
catch (e) {
console.error(e);
logger.error(e);
return false;
}
};
Expand All @@ -41,7 +42,7 @@ export async function reset_rules(chatId: string) {
return true;
}
catch (e) {
console.error(e);
logger.error(e);
return false;
}

Expand Down

0 comments on commit 6c9b542

Please sign in to comment.