Skip to content

Commit

Permalink
Fix logging by omitting the host and port in SetReadOnly (#13470)
Browse files Browse the repository at this point in the history
* feat: also print the socket

Signed-off-by: Manan Gupta <[email protected]>

* feat: remove host-port and socket

Signed-off-by: Manan Gupta <[email protected]>

---------

Signed-off-by: Manan Gupta <[email protected]>
  • Loading branch information
GuptaManan100 authored Jul 13, 2023
1 parent 5cffc8b commit 0babfe2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions go/vt/mysqlctl/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,7 @@ func (mysqld *Mysqld) SetReadOnly(on bool) error {
case true:
newState = "ReadOnly"
}
log.Infof("SetReadOnly setting connection setting of %s:%d to : %s",
mysqld.dbcfgs.Host, mysqld.dbcfgs.Port, newState)
log.Infof("SetReadOnly setting to : %s", newState)

query := "SET GLOBAL read_only = "
if on {
Expand Down

0 comments on commit 0babfe2

Please sign in to comment.