Skip to content

Commit

Permalink
client: don't evaluate log arguments unless enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@redhat.com>
  • Loading branch information
jcaamano committed Jun 2, 2022
1 parent 7f73b73 commit b41a3b1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions client/transact.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ func (o *ovsdbClient) transactReconnect(ctx context.Context, operation ...ovsdb.
if o.rpcClient == nil || !o.connected {
o.rpcMutex.RUnlock()
if o.options.reconnect {
o.logger.V(5).Info("blocking transaction until reconnected", "operations",
fmt.Sprintf("%+v", operation))
o.logger.V(5).Info("blocking transaction until reconnected", "operations", operation)
ticker := time.NewTicker(50 * time.Millisecond)
defer ticker.Stop()
ReconnectWaitLoop:
Expand Down Expand Up @@ -75,7 +74,7 @@ func (o *ovsdbClient) transact(ctx context.Context, dbName string, operation ...
if o.rpcClient == nil {
return nil, ErrNotConnected
}
o.logger.V(4).Info("transacting operations", "database", dbName, "operations", fmt.Sprintf("%+v", operation))
o.logger.V(4).Info("transacting operations", "database", dbName, "operations", operation)
var reply []ovsdb.OperationResult
err := o.rpcClient.CallWithContext(ctx, "transact", args, &reply)
if err != nil {
Expand Down

0 comments on commit b41a3b1

Please sign in to comment.