Skip to content

Commit f07c19e

Browse files
author
pedro
committed
feat:添加file配置控制日志文件的开启和关闭
1 parent e84e99e commit f07c19e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/config/log.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module.exports = {
55
level: 'DEBUG',
66
dir: 'logs',
77
sizeLimit: 1024 * 1024 * 5,
8-
requestLog: true
8+
requestLog: true,
9+
file: true
910
}
1011
};

app/dao/admin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class AdminDao {
4040
);
4141
let sql1 =
4242
'SELECT COUNT(*) as count FROM lin_user WHERE lin_user.admin=:admin AND lin_user.delete_time IS NULL';
43-
groupId && (sql1 += ` lin_user.group_id=${groupId}`);
43+
groupId && (sql1 += ` AND lin_user.group_id=${groupId}`);
4444
let total = await db.query(sql1, {
4545
replacements: {
4646
admin: UserAdmin.COMMON

0 commit comments

Comments
 (0)