ronething commented on code in PR #12825:
URL: https://github.com/apache/apisix/pull/12825#discussion_r2646806493
##########
apisix/plugins/file-logger.lua:
##########
@@ -79,17 +82,43 @@ local _M = {
}
+local function get_configured_path(conf)
+ if conf.path then
+ return conf.path
+ end
+
+ local metadata = plugin.plugin_metadata(plugin_name)
+ if metadata and metadata.value and metadata.value.path then
+ return metadata.value.path
+ end
+
+ return nil, "property \"path\" is required"
Review Comment:
We have removed `required = {"path"}`, but it returns `is required` when
path is empty. can we add something like `neither the metadata nor the conf is
configured`
--
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]