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

Log virtual-hosts information per request #442

Merged
merged 1 commit into from
May 12, 2024
Merged

Conversation

joseluisq
Copy link
Collaborator

Description

This PR logs relevant virtual-hosts information like host and root per incoming request.

Log entry example:

2024-05-12T22:21:31.840432Z  INFO static_web_server::log_addr: incoming request: method=GET uri=/ remote_addr=[::1]:62623
2024-05-12T22:21:48.074323Z  INFO static_web_server::log_addr: incoming request: method=GET uri=/ remote_addr=[::1]:62625
2024-05-12T22:21:48.074394Z  INFO static_web_server::virtual_hosts: virtual host matched: vhost=example.com vhost_root=docker method=GET uri=/

Related Issue

Resolves #322

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

@joseluisq joseluisq added enhancement New feature or request v2 v2 release advanced-feature Advanced feature only available via the configuration file labels May 12, 2024
Copy link

semanticdiff-com bot commented May 12, 2024

Review changes with SemanticDiff.

Analyzed 3 of 3 files.

Overall, the semantic diff is 16% smaller than the GitHub diff.

Filename Status
✔️ src/handler.rs Analyzed
✔️ src/lib.rs Analyzed
✔️ src/virtual_hosts.rs 15.94% smaller

@joseluisq joseluisq merged commit 778477e into master May 12, 2024
37 checks passed
@joseluisq joseluisq deleted the log-virtual-host-match branch May 12, 2024 22:45
@joseluisq joseluisq added this to the v2.31.0 milestone May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced-feature Advanced feature only available via the configuration file enhancement New feature or request v2 v2 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add virtual host domain to logging
1 participant