summaryrefslogtreecommitdiff
path: root/src/models/note.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/note.ts')
-rw-r--r--src/models/note.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/models/note.ts b/src/models/note.ts
index a887cf1c84..b3d5ed6977 100644
--- a/src/models/note.ts
+++ b/src/models/note.ts
@@ -1,7 +1,7 @@
import * as mongo from 'mongodb';
import * as deepcopy from 'deepcopy';
import rap from '@prezzemolo/rap';
-import db from '../db/mongodb';
+import db, { dbLogger } from '../db/mongodb';
import isObjectId from '../misc/is-objectid';
import { length } from 'stringz';
import { IUser, pack as packUser } from './user';
@@ -231,7 +231,7 @@ export const pack = async (
// (データベースの欠損などで)投稿がデータベース上に見つからなかったとき
if (_note == null) {
- console.warn(`[DAMAGED DB] (missing) pkg: note :: ${note}`);
+ dbLogger.warn(`[DAMAGED DB] (missing) pkg: note :: ${note}`);
return null;
}
@@ -367,18 +367,18 @@ export const pack = async (
//#region (データベースの欠損などで)参照しているデータがデータベース上に見つからなかったとき
if (_note.user == null) {
- console.warn(`[DAMAGED DB] (missing) pkg: note -> user :: ${_note.id} (user ${_note.userId})`);
+ dbLogger.warn(`[DAMAGED DB] (missing) pkg: note -> user :: ${_note.id} (user ${_note.userId})`);
return null;
}
if (opts.detail) {
if (_note.replyId != null && _note.reply == null) {
- console.warn(`[DAMAGED DB] (missing) pkg: note -> reply :: ${_note.id} (reply ${_note.replyId})`);
+ dbLogger.warn(`[DAMAGED DB] (missing) pkg: note -> reply :: ${_note.id} (reply ${_note.replyId})`);
return null;
}
if (_note.renoteId != null && _note.renote == null) {
- console.warn(`[DAMAGED DB] (missing) pkg: note -> renote :: ${_note.id} (renote ${_note.renoteId})`);
+ dbLogger.warn(`[DAMAGED DB] (missing) pkg: note -> renote :: ${_note.id} (renote ${_note.renoteId})`);
return null;
}
}