Commit ce061846 authored by 孙傲's avatar 孙傲

update:增加错误日志明细

parent 473eb18d
...@@ -209,7 +209,16 @@ function errorHandler() { ...@@ -209,7 +209,16 @@ function errorHandler() {
} catch (e) { } catch (e) {
ctx.status = 200; ctx.status = 200;
ctx.body = transformError(e); ctx.body = transformError(e);
log.error(e); log.error({
url: ctx.request.url,
body: ctx.request.body,
headers: {
"user-agent": ctx.headers["user-agent"],
"x-real-ip": ctx.headers["x-real-ip"],
"x-forwarded-for": ctx.headers["x-forwarded-for"]
},
error: e
});
} }
}; };
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment