bisakhmondal commented on a change in pull request #6228:
URL: https://github.com/apache/apisix/pull/6228#discussion_r803310088
##########
File path: apisix/plugins/loggly.lua
##########
@@ -85,6 +86,17 @@ local schema = {
type = "boolean",
default = true
},
+ severity_map = {
+ type = "object",
+ description = "upstream response code vs syslog severity mapping",
+ patternProperties = {
+ [".*"] = {
Review comment:
@spacewander It works as well as doesn't work.
Example 1: Want :heavy_check_mark: Got: :heavy_check_mark:
```json
...
"severity_map": {
"200": "INFO"
}
...
```
Example 2: Want :x: Got: :x:
```json
...
"severity_map": {
"200": "abc"
}
...
```
Example 3: Want :x: Got: :heavy_check_mark: :
```json
...
"severity_map": {
"abc": "def"
}
...
```
The problem is, if the key fails to match regex, the pattern properties
don't get applied. Also, the program doesn't throw an error for the key
mismatch.
--
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]