Skip to content

Debug log all dials#727

Merged
mmatczuk merged 2 commits intomainfrom
mmt/log_dial
Feb 28, 2024
Merged

Debug log all dials#727
mmatczuk merged 2 commits intomainfrom
mmt/log_dial

Conversation

@mmatczuk
Copy link
Contributor

@mmatczuk mmatczuk commented Feb 28, 2024

Fixes #645

This is a temporary solution until we have context-aware logging everywhere.
It allows us to log the network and address of the connection being established together with the trace ID.
@mmatczuk mmatczuk requested a review from Choraden as a code owner February 28, 2024 15:02
2024/02/28 14:55:23.447579 [proxy] [DEBUG] closing connection from 127.0.0.1:54332 duration=1.982912042s
2024/02/28 14:56:10.294136 [proxy] [DEBUG] accepted connection from 127.0.0.1:54337
2024/02/28 14:56:10.294249 [proxy] [DEBUG] [2-4c948b90] read CONNECT request host=google.com:443
2024/02/28 14:56:10.294267 [proxy] [DEBUG] [2-4c948b90] CONNECT to host directly: google.com:443
2024/02/28 14:56:10.294271 [proxy] [DEBUG] [2-4c948b90] opening connection to tcp google.com:443
2024/02/28 14:56:10.353445 [proxy] [DEBUG] [2-4c948b90] connection to tcp google.com:443 established duration=59.166ms

Fixes #645
@mmatczuk mmatczuk merged commit 6ad7638 into main Feb 28, 2024
@mmatczuk mmatczuk deleted the mmt/log_dial branch February 28, 2024 16:51
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.

martian: add logging when new connections are dialed

2 participants