kamly commented on code in PR #9712:
URL: https://github.com/apache/apisix/pull/9712#discussion_r1261848202
##########
apisix/utils/log-util.lua:
##########
@@ -267,6 +287,12 @@ function _M.check_log_schema(conf)
return nil, "failed to validate the 'include_resp_body_expr'
expression: " .. err
end
end
+ if conf.matches then
+ local ok, err = expr.new(conf.matches)
+ if not ok then
+ return nil, "failed to validate the 'matches' expression: " .. err
+ end
+ end
Review Comment:
@monkeyDluffy6017
I think this judgment can be implemented in the underlying function.
If other logger plugins need it, you only need to define `matches` in the
`scheme` to have this feature
@Gallardot WDYT?
--
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]