Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request help: How to record interface(restful api) request log and return log? #5585

Closed
90yangkang opened this issue Nov 23, 2021 · 9 comments

Comments

@90yangkang
Copy link

Issue description

For example, when a request arrives at apifix, you can record the time of the request, URL parameters, body parameters, return time and return data of the request.

Environment

  • apisix version: 2.10
  • OS : docker OS
  • OpenResty / Nginx version:1.19.0-alpine
  • etcd version, if have : 3.4.15
  • apisix-dashboard version:2.9.0
@tokers
Copy link
Contributor

tokers commented Nov 23, 2021

@bzp2010 PTAL, thanks!

@tzssangglass
Copy link
Member

tzssangglass commented Nov 23, 2021

kafka-logger can do this

@90yangkang
Copy link
Author

kafka-logger can do this

No Kafuka server @tzssangglass

@tzssangglass
Copy link
Member

you can use some other logger plugin, such as http-looger, tcp-logger or write plugin to do this. APISIX can record what you have said and you will need to make your own choices depending on the situation.

@90yangkang
Copy link
Author

you can use some other logger plugin, such as http-looger, tcp-logger or write plugin to do this. APISIX can record what you have said and you will need to make your own choices depending on the situation.

http-logger and tcp-logger record the request info, don't record the return info.

@tzssangglass
Copy link
Member

some existing PRs are refining these features, e.g. #5550

http-logger and tcp-logger support record response can refer to this, if you are interested, PR is welcome!

@90yangkang
Copy link
Author

some existing PRs are refining these features, e.g. #5550

http-logger and tcp-logger support record response can refer to this, if you are interested, PR is welcome!

微信截图_20211124192659

微信截图_20211124152248

use http-logger, Failed to get log_ format。

@tzssangglass
Copy link
Member

not relevant to this issue, see: #4098 (comment)

@90yangkang
Copy link
Author

not relevant to this issue, see: #4098 (comment)

Ok,thanks~

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

No branches or pull requests

3 participants