@@ -33,7 +33,7 @@ module.exports = options => {
};
} else {
logData = {
- id: this.logId, requestTime: ctx.logTime, responseTime, runTime,
+ id: ctx.logId, requestTime: ctx.logTime, responseTime, runTime,
}
const bLogger = runTime > 500 ? ctx.getLogger('warning') : ctx.getLogger('finish');
@@ -36,7 +36,7 @@ module.exports = app => {
async responseLog(runTime){
- if (!this.ctx.session) return;
+ if (!this.ctx.session || !this.ctx.session.sessionProject || !this.ctx.session.sessionUser) return;
await this.defaultUpdate({ id: this.ctx.logId, is_response: 1, run_time: runTime });