Skip to content

Conversation

@shuaijinchao
Copy link
Member

What this PR does / why we need it:

FIX https://the-asf.slack.com/archives/CUC5MN17A/p1646136677114399

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

t/lib/server.lua Outdated
end
end

local function str_split(str, reps)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add the mock API in the test file like:

location /clickhouse-logger/test {

It's not commonly used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@shuaijinchao shuaijinchao requested a review from spacewander March 2, 2022 11:18
query = {query}
end
local data, err = require("cjson").decode(body)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, Why do we need to decode the body?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log format data is JSON, and we need to get the information in the structure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

tzssangglass
tzssangglass previously approved these changes Mar 2, 2022
val = val[key]
end
end
ngx.log(ngx.ERR ,query[i], ":", val)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use WARN log level

},
"uri": "/http-logger/test"
}]],
[[{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove the response body check

@spacewander spacewander merged commit 7fc2d8b into apache:master Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants