diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-28 14:53:39 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-28 14:53:39 +0100 |
| commit | 1a9e9080548c952cc81c01782eb9f01f6aed459e (patch) | |
| tree | 7e23e063404f181a59405e628bab121402bd3fc5 /client/fsm.go | |
| parent | 5c8886236a0f6fc2c7674f7132ec09a13b65564a (diff) | |
Log: Define f prefix for log functions to indicate printf like
Diffstat (limited to 'client/fsm.go')
| -rw-r--r-- | client/fsm.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/client/fsm.go b/client/fsm.go index 0effb2a..316dea4 100644 --- a/client/fsm.go +++ b/client/fsm.go @@ -274,7 +274,7 @@ func (client *Client) SetConnected() error { errorMessage := "failed to set connected" if client.InFSMState(StateConnected) { // already connected, show no error - client.Logger.Warning("Already connected") + client.Logger.Warningf("Already connected") return nil } if !client.FSM.HasTransition(StateConnected) { @@ -303,7 +303,7 @@ func (client *Client) SetConnecting() error { errorMessage := "failed to set connecting" if client.InFSMState(StateConnecting) { // already loading connection, show no error - client.Logger.Warning("Already connecting") + client.Logger.Warningf("Already connecting") return nil } if !client.FSM.HasTransition(StateConnecting) { @@ -332,7 +332,7 @@ func (client *Client) SetDisconnecting() error { errorMessage := "failed to set disconnecting" if client.InFSMState(StateDisconnecting) { // already disconnecting, show no error - client.Logger.Warning("Already disconnecting") + client.Logger.Warningf("Already disconnecting") return nil } if !client.FSM.HasTransition(StateDisconnecting) { @@ -362,7 +362,7 @@ func (client *Client) SetDisconnected(cleanup bool) error { errorMessage := "failed to set disconnected" if client.InFSMState(StateDisconnected) { // already disconnected, show no error - client.Logger.Warning("Already disconnected") + client.Logger.Warningf("Already disconnected") return nil } if !client.FSM.HasTransition(StateDisconnected) { @@ -394,7 +394,7 @@ func (client *Client) SetDisconnected(cleanup bool) error { func (client *Client) goBackInternal() { goBackErr := client.GoBack() if goBackErr != nil { - client.Logger.Info( + client.Logger.Infof( fmt.Sprintf( "Failed going back, error: %s", types.ErrorTraceback(goBackErr), |
