log: more

This commit is contained in:
DIYgod
2019-03-27 18:49:52 +08:00
parent ae20bb6731
commit fa6d5b3abf
+2
View File
@@ -144,6 +144,7 @@ module.exports = function(app, options = {}) {
let type;
let ok = false;
logger.warn(`getCache in ${key} ${value}`);
if (value) {
ctx.response.status = 200;
type = (await globalCache.get(tkey)) || 'text/html';
@@ -243,6 +244,7 @@ module.exports = function(app, options = {}) {
try {
ok = await getCache(ctx, key, tkey);
} catch (e) {
logger.warn(`getCache catch ${e instanceof Error ? e.stack : e}`);
ok = false;
}
if (ok) {