diff --git a/lib/decorator/index.ts b/lib/decorator/index.ts index d0cf06e..07576ae 100644 --- a/lib/decorator/index.ts +++ b/lib/decorator/index.ts @@ -403,7 +403,7 @@ export const ResponseJson = rs = await oriValue.apply(this, args); rs = dataWrapper(rs); } catch (e) { - ctx.logger.error(e); + ctx.app.logger.error(e); rs = errorWrapper(e); } ctx.body = rs; diff --git a/package.json b/package.json index 6176418..b7239f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "egg-fancy-decorator", - "version": "1.0.6", + "version": "1.0.7", "description": "Decorator support plugin for egg framework", "main": "lib/index.js", "types": "index.d.ts",