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 enable logging for the four-layer proxy stream route? #5400

Closed
feeops opened this issue Nov 2, 2021 · 5 comments · Fixed by #5768
Closed

request help: How to enable logging for the four-layer proxy stream route? #5400

feeops opened this issue Nov 2, 2021 · 5 comments · Fixed by #5768
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@feeops
Copy link

feeops commented Nov 2, 2021

Issue description

七层的http日志是存储在acccess.log中的

四层代理stream route如何启用日志并自定义日志路径呢?

传统的openresty是可以实现的

Environment

最新版

@spacewander
Copy link
Member

We haven't supported it yet. PR is welcome!

@spacewander spacewander added enhancement New feature or request good first issue Good for newcomers labels Nov 2, 2021
@feeops
Copy link
Author

feeops commented Nov 2, 2021

We haven't supported it yet. PR is welcome!

结合tcp-logger插件能实现吗?

@spacewander
Copy link
Member

No

@spacewander
Copy link
Member

You can add access log configuration in

and render in the template. See https://nginx.org/en/docs/stream/ngx_stream_log_module.html

@feeops
Copy link
Author

feeops commented Nov 4, 2021

You can add access log configuration in

and render in the template. See https://nginx.org/en/docs/stream/ngx_stream_log_module.html

这个不起作用,可以在config.yaml中添加

nginx_config:
  stream_configuration_snippet: |
    log_format basic '$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received  $session_time $upstream_addr $upstream_bytes_sent $upstream_bytes_received $upstream_connect_time';
    access_log logs/access_stream.log basic;

@moonming moonming changed the title request help: 四层代理stream route如何启用日志? request help: How to enable logging for the four-layer proxy stream route? Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants