From 64de0a45ae6677006911155a6752ca36c12cf825 Mon Sep 17 00:00:00 2001 From: Martin Vahlensieck Date: Fri, 20 Dec 2024 18:16:29 +0100 Subject: [PATCH] Use constant strings in logging calls --- .../main/java/org/polypheny/db/docker/DockerInstance.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/polypheny/db/docker/DockerInstance.java b/core/src/main/java/org/polypheny/db/docker/DockerInstance.java index c7d62d03ae..0a90853e4d 100644 --- a/core/src/main/java/org/polypheny/db/docker/DockerInstance.java +++ b/core/src/main/java/org/polypheny/db/docker/DockerInstance.java @@ -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() ); } } @@ -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 ); } } ); @@ -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 ) ); } } } @@ -283,7 +283,7 @@ Optional 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 ) ); } }