You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/12/05 04:59:59 UTC
[GitHub] [apisix] tzssangglass commented on pull request #8414: feat: support file-logger plugin of response body record
tzssangglass commented on PR #8414:
URL: https://github.com/apache/apisix/pull/8414#issuecomment-1336752819
hi @pixeldin , we have error log as ` attempt to set ngx.status after sending out response headers`, we need to avoid call `ngx.status = code` after `ngx.say`, try with
```diff
diff --git t/plugin/file-logger2.t t/plugin/file-logger2.t
index ccd1d9f5..ad4396c0 100644
--- t/plugin/file-logger2.t
+++ t/plugin/file-logger2.t
@@ -164,7 +164,6 @@ contain with target
if new_msg.response.body == "hello world\n"
then
- ngx.status = code
ngx.say('contain target body hits with expr')
end
@@ -174,7 +173,6 @@ contain with target
local new_msg = core.json.decode(msg)
if new_msg.response.body == nil
then
- ngx.status = code
ngx.say('skip unconcern body')
end
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org