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 reason for reconnect and underlying connection protocol #125

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

cgzones
Copy link
Contributor

@cgzones cgzones commented Oct 7, 2024

No description provided.


r = connect(m->socket, &m->address.sockaddr.sa, salen);
if (r < 0 && errno != EINPROGRESS)
return log_error_errno(errno, "Failed to connect to remote server='%s': %m", pretty);
return log_error_errno(errno, "Failed to connect to remote server='%s/%s': %m", pretty, protocol);

Copy link
Collaborator

Choose a reason for hiding this comment

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

protocol_to_string should be suffice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, thanks for the pointer; changed.

@@ -167,16 +171,27 @@ int manager_network_connect_socket(Manager *m) {
if (r < 0)
return r;

log_debug("Connecting to remote server: '%s'", pretty);
switch (m->protocol) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we already doing it via protocol_to_string no ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dito

@ssahani ssahani merged commit e8ddb8d into systemd:main Oct 21, 2024
1 check passed
@ssahani
Copy link
Collaborator

ssahani commented Oct 21, 2024

Thank you

@cgzones cgzones deleted the logging branch October 21, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants