feat(logger}: 支持更好的日志输出, 完善了文档

This commit is contained in:
ImFurina
2025-08-24 23:10:24 +08:00
parent 11e1c62cc3
commit ceb2044500
27 changed files with 915 additions and 832 deletions
+4 -3
View File
@@ -1,5 +1,6 @@
var url = require('url')
var MemoryCache = require('./memory-cache')
const logger = require('./logger.js')
var t = {
ms: 1,
@@ -349,7 +350,7 @@ function ApiCache() {
try {
redis.del(key)
} catch (err) {
console.log('[apicache] error in redis.del("' + key + '")')
logger.info('[apicache] error in redis.del("' + key + '")')
}
}
index.all = index.all.filter(doesntMatch(key))
@@ -373,7 +374,7 @@ function ApiCache() {
try {
redis.del(target)
} catch (err) {
console.log('[apicache] error in redis.del("' + target + '")')
logger.info('[apicache] error in redis.del("' + target + '")')
}
}
@@ -404,7 +405,7 @@ function ApiCache() {
try {
redis.del(key)
} catch (err) {
console.log('[apicache] error in redis.del("' + key + '")')
logger.info('[apicache] error in redis.del("' + key + '")')
}
})
}