fix: logger输出

This commit is contained in:
bietiaop 2024-07-31 17:21:57 +08:00
parent 8a420e8fe1
commit 14b528b87b
3 changed files with 3 additions and 4 deletions

View file

@ -20,7 +20,7 @@ export function getDB(dbName, dbFile) {
const dbPath = path.join(dbFolder, `${dbFile}.json`);
return JSON.parse(readFileSync(dbPath, 'utf-8'));
} catch (error) {
logger.mark(`读取数据库失败: ${error.message}`);
logger.debug(`读取数据库失败: ${error.message}`);
return null;
}
}
@ -39,7 +39,7 @@ export function setDB(dbName, dbFile, data) {
const dbPath = path.join(dbFolder, `${dbFile}.json`);
writeFileSync(dbPath, JSON.stringify(data, null, 2));
} catch (error) {
logger.mark(`读取数据库失败: ${error.message}`);
logger.debug(`读取数据库失败: ${error.message}`);
}
}