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

Fixed garbled logging messages in PG connector #1192

Merged
merged 1 commit into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/plugin/connectors/tcp/pg/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (s *SingleUseConnector) ConnectToBackend() error {
return err
}

s.logger.Debugln(
s.logger.Debugf(
"Successfully connected to '%s:%s'",
s.connectionDetails.Host,
s.connectionDetails.Port,
Expand Down
6 changes: 3 additions & 3 deletions internal/plugin/connectors/tcp/pg/startup.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// Startup performs the startup handshake with the client and parses the client
// options to extract the database name.
func (s *SingleUseConnector) Startup() error {
s.logger.Debugln("Handling connection %v", s.clientConn)
s.logger.Debugf("Handling connection %+v -> %+v", s.clientConn.RemoteAddr(), s.clientConn.LocalAddr())

messageBytes, err := protocol.ReadStartupMessage(s.clientConn)
if err != nil {
Expand All @@ -21,8 +21,8 @@ func (s *SingleUseConnector) Startup() error {
return err
}

s.logger.Debugln(
"s.Client version : %v, (SSL mode: %v)",
s.logger.Debugf(
"s.Client version: %v, (SSL mode: %v)",
version,
version == protocol.SSLRequestCode)

Expand Down