Skip to content

Commit

Permalink
Use constant strings in logging calls
Browse files Browse the repository at this point in the history
  • Loading branch information
gartens committed Dec 20, 2024
1 parent 63fb569 commit 64de0a4
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private enum Status {
try {
checkConnection();
} catch ( IOException e ) {
log.error( "Could not connect to docker instance " + host.alias() + ": " + e.getMessage() );
log.error( "Could not connect to docker instance {}: {}", host.alias(), e.getMessage() );
}
}

Expand Down Expand Up @@ -117,7 +117,7 @@ private void handleNewDockerInstance() throws IOException {
try {
this.client.deleteContainer( containerInfo.getUuid() );
} catch ( IOException e ) {
log.error( "Failed to delete container " + containerInfo.getUuid(), e );
log.error( "Failed to delete container {}", containerInfo.getUuid(), e );
}
}
);
Expand Down Expand Up @@ -170,7 +170,7 @@ public void reconnect() {
}
checkConnection();
} catch ( IOException e ) {
log.info( "Failed to reconnect: " + e );
log.info( "Failed to reconnect: {}", String.valueOf( e ) );
}
}
}
Expand Down Expand Up @@ -283,7 +283,7 @@ Optional<HandshakeInfo> updateConfig( String hostname, String alias, String regi
this.host = newHost;
checkConnection();
} catch ( IOException e ) {
log.info( "Failed to connect to '" + hostname + "': " + e.getMessage() );
log.info( "Failed to connect to '{}': {}", hostname, e.getMessage() );
return Optional.of( HandshakeManager.getInstance().newHandshake( newHost, null, true ) );
}
}
Expand Down

0 comments on commit 64de0a4

Please sign in to comment.