diff --git a/src/main/java/com/redhat/red/build/koji/KojiClient.java b/src/main/java/com/redhat/red/build/koji/KojiClient.java index f38bb27..a1eecba 100644 --- a/src/main/java/com/redhat/red/build/koji/KojiClient.java +++ b/src/main/java/com/redhat/red/build/koji/KojiClient.java @@ -205,7 +205,7 @@ public void setup() { objectMapper = new KojiObjectMapper(); - logger.debug( "SETUP: Starting KojiClient for: " + config.getKojiURL() ); + logger.debug( "SETUP: Starting KojiClient for: {}", config.getKojiURL() ); try { xmlrpcClient = new HC4SyncObjectClient( httpFactory, config.getKojiSiteConfig(), metricRegistry ); @@ -225,17 +225,14 @@ public void setup() if ( 1 != response.getApiVersion() ) { - logger.error( "Cannot connect to koji at: " + config.getKojiURL() + ". API Version reported is '" - + response.getApiVersion() + "' but this client only supports version 1." ); + logger.error( "Cannot connect to koji at: {}. API Version reported is '{}' but this client only supports version 1.", config.getKojiURL(), response.getApiVersion() ); xmlrpcClient.close(); xmlrpcClient = null; } } catch ( XmlRpcException e ) { - logger.error( - "Cannot retrieve koji API version from: " + config.getKojiURL() + ". (Reason: " + e.getMessage() - + ")", e ); + logger.error( "Cannot retrieve koji API version from: {}. (Reason: {})", config.getKojiURL(), e.getMessage(), e ); xmlrpcClient.close(); xmlrpcClient = null; } @@ -453,7 +450,7 @@ public void logout( KojiSessionInfo session ) } catch ( XmlRpcException e ) { - logger.error( String.format( "Failed to logout: %s", e.getMessage() ), e ); + logger.error( "Failed to logout: {}", e.getMessage(), e ); } } @@ -463,7 +460,7 @@ public void logout( KojiSessionInfo session ) } catch ( DestroyFailedException e ) { - logger.error( String.format( "Failed to destroy session: %s", e.getMessage() ), e ); + logger.error( "Failed to destroy session: {}", e.getMessage(), e ); } } @@ -618,7 +615,7 @@ public KojiImportResult importBuild( KojiImport importInfo, Iterable T doCall( final Object request, final Class responseType, final U } final String content = new RWXMapper().render( request ); - logger.trace( "Sending request:\n\n" + content + "\n\n" ); + logger.trace( "Sending request:\n\n{}\n\n", content ); method.setEntity( new StringEntity( content ) ); } diff --git a/src/main/java/com/redhat/red/build/koji/model/converter/KojiBuildSourceConverter.java b/src/main/java/com/redhat/red/build/koji/model/converter/KojiBuildSourceConverter.java index efc60b6..566f7b3 100644 --- a/src/main/java/com/redhat/red/build/koji/model/converter/KojiBuildSourceConverter.java +++ b/src/main/java/com/redhat/red/build/koji/model/converter/KojiBuildSourceConverter.java @@ -39,7 +39,7 @@ public BuildSource parse( Object object ) String[] parts = String.valueOf( object ).split( "#" ); if ( parts.length < 2 || isEmpty( parts[0] ) || isEmpty( parts[1] ) ) { - logger.warn("Invalid build-source: '" + object + "'. Must be of format '#'"); + logger.warn( "Invalid build-source: '{}'. Must be of format '#'", object ); } BuildSource source = new BuildSource( parts[0] ); if ( parts.length > 1 )