log: more

This commit is contained in:
DIYgod 2019-03-27 18:49:52 +08:00
parent ae20bb6731
commit fa6d5b3abf
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
1 changed files with 2 additions and 0 deletions

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) {