monkeyDluffy6017 commented on code in PR #9712:
URL: https://github.com/apache/apisix/pull/9712#discussion_r1254297599
##########
t/plugin/file-logger2.t:
##########
@@ -274,3 +274,95 @@ passed
}
--- response_body
write file log success
+
+=== TEST 8: Add new configuration with vars_match
Review Comment:
Three blanks are needed
##########
t/plugin/file-logger2.t:
##########
@@ -274,3 +274,95 @@ passed
}
--- response_body
write file log success
+
+=== TEST 8: Add new configuration with vars_match
+--- config
+ location /t {
+ content_by_lua_block {
+ local t = require("lib.test_admin").test
+ local code, body = t('/apisix/admin/routes/1',
+ ngx.HTTP_PUT,
+ [[{
+ "plugins": {
+ "file-logger": {
+ "path": "file-with-vars_match.log",
+ "vars": [
+ [
+ [ "arg_name","==","jack" ]
+ ]
+ ],
+ "log_format": {
+ "request": "$request"
+ }
+ }
+ },
+ "upstream": {
+ "nodes": {
+ "127.0.0.1:1982": 1
+ },
+ "type": "roundrobin"
+ },
+ "uri": "/hello"
+ }]]
+ )
+ if code >= 300 then
+ ngx.status = code
+ end
+ ngx.say(body)
+ }
+ }
+--- response_body
+passed
+
+=== TEST 9: Request matches vars_match
Review Comment:
Ditto
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]