日志:添加没有paramDecode的接口的日志
This commit is contained in:
@@ -35,7 +35,9 @@ module.exports = options => {
|
||||
let url = ctx.request.url;
|
||||
ctx.logcode = genCode(10);
|
||||
if(url.indexOf("/dev") == 0 || url.indexOf("/web") == 0 || url.indexOf("/cb") == 0) {
|
||||
ctx.service.utils.log('INFO', `[${ctx.request.url}] [${ctx.logcode}] request: ${JSON.stringify(ctx.request.body)}`);
|
||||
await next();
|
||||
ctx.service.utils.log('INFO', `[${ctx.request.url}] [${ctx.logcode}] res: ${JSON.stringify(ctx.body)}`)
|
||||
return;
|
||||
}
|
||||
if (options.threshold && ctx.length < options.threshold) return;
|
||||
|
||||
Reference in New Issue
Block a user