diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/ClientSymmetricEngine.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/ClientSymmetricEngine.java index 2eaa4b93d3..43f16f6488 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/ClientSymmetricEngine.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/ClientSymmetricEngine.java @@ -148,7 +148,7 @@ protected void waitForAvailableDatabase() { success = true; } catch (Exception ex) { log.error( - "Could not get a connection to the database: %s. Waiting for 10 seconds before trying to connect to the database again.", + "Could not get a connection to the database: {}. Waiting for 10 seconds before trying to connect to the database again.", ex.getMessage()); AppUtils.sleep(10000); } finally { diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/db2/Db2SymmetricDialect.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/db2/Db2SymmetricDialect.java index 0891518813..42e9cbd107 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/db2/Db2SymmetricDialect.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/db2/Db2SymmetricDialect.java @@ -46,17 +46,17 @@ protected boolean createTablesIfNecessary() { + parameterService.getTablePrefix() + "_trigger_hist") + 1; platform.getSqlTemplate().update("alter table " + parameterService.getTablePrefix() + "_trigger_hist alter column trigger_hist_id restart with " + triggerHistId); - log.info("Resetting auto increment columns for %s", parameterService.getTablePrefix() + "_trigger_hist"); + log.info("Resetting auto increment columns for {}", parameterService.getTablePrefix() + "_trigger_hist"); long outgoingBatchId = platform.getSqlTemplate().queryForLong("select max(batch_id) from " + parameterService.getTablePrefix() + "_outgoing_batch") + 1; platform.getSqlTemplate().update("alter table " + parameterService.getTablePrefix() + "_outgoing_batch alter column batch_id restart with " + outgoingBatchId); - log.info("Resetting auto increment columns for %s", parameterService.getTablePrefix() + "_outgoing_batch"); + log.info("Resetting auto increment columns for {}", parameterService.getTablePrefix() + "_outgoing_batch"); long dataId = platform.getSqlTemplate().queryForLong("select max(data_id) from " + parameterService.getTablePrefix() + "_data") + 1; platform.getSqlTemplate().update("alter table " + parameterService.getTablePrefix() + "_data alter column data_id restart with " + dataId); - log.info("Resetting auto increment columns for %s", parameterService.getTablePrefix() + "_data"); + log.info("Resetting auto increment columns for {}", parameterService.getTablePrefix() + "_data"); } return tablesCreated; } @@ -120,4 +120,4 @@ protected String getDbSpecificDataHasChangedCondition(Trigger trigger) { return "var_row_data != var_old_data"; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/db2/Db2v9SymmetricDialect.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/db2/Db2v9SymmetricDialect.java index 7917b9a328..0d33b6db83 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/db2/Db2v9SymmetricDialect.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/db2/Db2v9SymmetricDialect.java @@ -47,7 +47,7 @@ protected void initTablesAndFunctionsForSpecificDialect() { transaction.commit(); } catch (Exception e) { try { - log.info("Creating environment variables %s and %s", SYNC_TRIGGERS_DISABLED_USER_VARIABLE, + log.info("Creating environment variables {} and {}", SYNC_TRIGGERS_DISABLED_USER_VARIABLE, SYNC_TRIGGERS_DISABLED_NODE_VARIABLE); new SqlScript(getSqlScriptUrl(), getPlatform().getSqlTemplate(), ";").execute(); } catch (Exception ex) { @@ -83,4 +83,4 @@ public String getSourceNodeExpression() { return SYNC_TRIGGERS_DISABLED_NODE_VARIABLE; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/firebird/FirebirdSymmetricDialect.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/firebird/FirebirdSymmetricDialect.java index 0d23d619d4..3922049163 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/firebird/FirebirdSymmetricDialect.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/firebird/FirebirdSymmetricDialect.java @@ -119,4 +119,4 @@ public void truncateTable(String tableName) { platform.getSqlTemplate().update("delete from " + tableName); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/h2/H2SymmetricDialect.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/h2/H2SymmetricDialect.java index 2e2a3060be..b09863c01e 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/h2/H2SymmetricDialect.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/h2/H2SymmetricDialect.java @@ -68,14 +68,14 @@ public void removeTrigger(StringBuilder sqlBuffer, String catalogName, String sc try { int count = platform.getSqlTemplate().update(dropSql); if (count > 0) { - log.info("Just dropped trigger %s", triggerName); + log.info("Just dropped trigger {}", triggerName); } count = platform.getSqlTemplate().update(dropTable); if (count > 0) { - log.info("Just dropped table %s_CONFIG", triggerName); + log.info("Just dropped table {}_CONFIG", triggerName); } } catch (Exception e) { - log.warn("Error removing %s: %s", triggerName, e.getMessage()); + log.warn("Error removing {}: {}", triggerName, e.getMessage()); } } } @@ -123,4 +123,4 @@ public boolean supportsTransactionId() { return true; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/hsqldb/HsqlDbSymmetricDialect.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/hsqldb/HsqlDbSymmetricDialect.java index 2dc70a6439..5c5a706ec5 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/hsqldb/HsqlDbSymmetricDialect.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/hsqldb/HsqlDbSymmetricDialect.java @@ -92,18 +92,18 @@ public void removeTrigger(StringBuilder sqlBuffer, String catalogName, String sc try { int count = platform.getSqlTemplate().update(dropSql); if (count > 0) { - log.info("Just dropped trigger %s", triggerName); + log.info("Just dropped trigger {}", triggerName); } } catch (Exception e) { - log.warn("Error removing %s: %s", triggerName, e.getMessage()); + log.warn("Error removing {}: {}", triggerName, e.getMessage()); } try { int count = platform.getSqlTemplate().update(dropTable); if (count > 0) { - log.info("Just dropped table %s_CONFIG", triggerName); + log.info("Just dropped table {}_CONFIG", triggerName); } } catch (Exception e) { - log.warn("Error removing %s: %s", triggerName, e.getMessage()); + log.warn("Error removing {}: {}", triggerName, e.getMessage()); } } } @@ -173,4 +173,4 @@ public boolean canGapsOccurInCapturedDataIds() { return false; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/hsqldb2/HsqlDb2SymmetricDialect.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/hsqldb2/HsqlDb2SymmetricDialect.java index 8c908d9bc7..e05752e839 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/hsqldb2/HsqlDb2SymmetricDialect.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/hsqldb2/HsqlDb2SymmetricDialect.java @@ -58,10 +58,10 @@ public void removeTrigger(StringBuilder sqlBuffer, String catalogName, String sc try { int count = platform.getSqlTemplate().update(dropSql); if (count > 0) { - log.info("Just dropped trigger %s", triggerName); + log.info("Just dropped trigger {}", triggerName); } } catch (Exception e) { - log.warn("Error removing %s: %s", triggerName, e.getMessage()); + log.warn("Error removing {}: {}", triggerName, e.getMessage()); } } } @@ -128,4 +128,4 @@ public boolean canGapsOccurInCapturedDataIds() { return false; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/interbase/InterbaseSymmetricDialect.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/interbase/InterbaseSymmetricDialect.java index f79cf96470..3c80be1053 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/interbase/InterbaseSymmetricDialect.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/interbase/InterbaseSymmetricDialect.java @@ -60,7 +60,7 @@ protected void initTablesAndFunctionsForSpecificDialect() { platform.getSqlTemplate().queryForInt("select count(*) from " + contextTableName); } catch (Exception e) { try { - log.info("Creating global temporary table %s", contextTableName); + log.info("Creating global temporary table {}", contextTableName); platform.getSqlTemplate().update(String.format(CONTEXT_TABLE_CREATE, contextTableName)); } catch (Exception ex) { log.error("Error while initializing Interbase dialect", ex); @@ -171,6 +171,6 @@ public void cleanupTriggers() { for (String name : names) { count += platform.getSqlTemplate().update("drop trigger " + name); } - log.info("Remove %d triggers", count); + log.info("Remove {} triggers", count); } } diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/mssql/MsSqlSymmetricDialect.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/mssql/MsSqlSymmetricDialect.java index 2f500c9ec6..439ac5c482 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/mssql/MsSqlSymmetricDialect.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/mssql/MsSqlSymmetricDialect.java @@ -74,7 +74,7 @@ public Boolean execute(Connection con) throws SQLException { stmt = con.createStatement(); stmt.execute(sql); } catch (Exception e) { - log.warn("Error removing %s: %s", triggerName, e.getMessage()); + log.warn("Error removing {}: {}", triggerName, e.getMessage()); } finally { if (catalogName != null) { con.setCatalog(previousCatalog); @@ -185,4 +185,4 @@ public boolean needsToSelectLobData() { return true; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/mysql/MySqlSymmetricDialect.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/mysql/MySqlSymmetricDialect.java index aae7fc18f2..a753abfe38 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/mysql/MySqlSymmetricDialect.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/mysql/MySqlSymmetricDialect.java @@ -83,7 +83,7 @@ protected void createRequiredFunctions() { platform.getSqlTemplate().update( triggerText.getFunctionSql(functions[i], funcName, platform.getDefaultSchema())); - log.info("Just installed %s", funcName); + log.info("Just installed {}", funcName); } } } @@ -176,4 +176,4 @@ public BinaryEncoding getBinaryEncoding() { protected String getDbSpecificDataHasChangedCondition(Trigger trigger) { return "var_row_data != var_old_data"; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/oracle/OracleSymmetricDialect.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/oracle/OracleSymmetricDialect.java index b76dc4893b..a5d438c22b 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/oracle/OracleSymmetricDialect.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/oracle/OracleSymmetricDialect.java @@ -227,4 +227,4 @@ protected String getDbSpecificDataHasChangedCondition(Trigger trigger) { } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/postgresql/PostgreSqlSymmetricDialect.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/postgresql/PostgreSqlSymmetricDialect.java index 4ee213db32..7f9885bac3 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/postgresql/PostgreSqlSymmetricDialect.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/postgresql/PostgreSqlSymmetricDialect.java @@ -141,4 +141,4 @@ public BinaryEncoding getBinaryEncoding() { return BinaryEncoding.BASE64; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/sybase/SybaseSymmetricDialect.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/sybase/SybaseSymmetricDialect.java index faa13e38a4..fe1ceb2748 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/sybase/SybaseSymmetricDialect.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/db/sybase/SybaseSymmetricDialect.java @@ -75,7 +75,7 @@ public Boolean execute(Connection con) throws SQLException { stmt = con.createStatement(); stmt.execute(sql); } catch (Exception e) { - log.warn("Error removing %s: %s", triggerName, e.getMessage()); + log.warn("Error removing {}: {}", triggerName, e.getMessage()); } finally { if (catalogName != null) { con.setCatalog(previousCatalog); @@ -182,4 +182,4 @@ public boolean needsToSelectLobData() { return true; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/service/jmx/NodeManagementService.java b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/service/jmx/NodeManagementService.java index 46ee07b1f8..d318654baf 100644 --- a/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/service/jmx/NodeManagementService.java +++ b/symmetric/symmetric-client/src/main/java/org/jumpmind/symmetric/service/jmx/NodeManagementService.java @@ -351,4 +351,4 @@ public String encryptText(String plainText) throws Exception { return ""; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-client/src/test/java/org/jumpmind/symmetric/tool/RefactorTool.java b/symmetric/symmetric-client/src/test/java/org/jumpmind/symmetric/tool/RefactorTool.java index a1a892ac96..0bdb022e95 100644 --- a/symmetric/symmetric-client/src/test/java/org/jumpmind/symmetric/tool/RefactorTool.java +++ b/symmetric/symmetric-client/src/test/java/org/jumpmind/symmetric/tool/RefactorTool.java @@ -22,6 +22,7 @@ public static void main(String[] args) throws Exception { } protected static boolean refactor(StringBuilder contents) { + boolean refactored = false; String[] lines = contents.toString().split("\n"); contents.setLength(0); int logmode = 0; @@ -31,14 +32,19 @@ protected static boolean refactor(StringBuilder contents) { } if (!line.contains("String.format") && logmode > 0) { + refactored = true; line = line.replace("%s", "{}"); line = line.replace("%d", "{}"); + logmode--; + } else { + logmode =0; } contents.append(line); contents.append("\n"); } - return true; + contents.substring(0, contents.length()-1); + return refactored; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/AbstractSymmetricEngine.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/AbstractSymmetricEngine.java index aee980f6e7..838fe74709 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/AbstractSymmetricEngine.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/AbstractSymmetricEngine.java @@ -305,11 +305,11 @@ public synchronized boolean start(boolean startJobs) { Node node = nodeService.findIdentity(); if (node != null) { log.info( - "Starting registered node [group=%s, id=%s, externalId=%s]", + "Starting registered node [group={}, id={}, externalId={}]", new Object[] { node.getNodeGroupId(), node.getNodeId(), node.getExternalId() }); } else { - log.info("Starting unregistered node [group=%s, externalId=%s]", + log.info("Starting unregistered node [group={}, externalId={}]", parameterService.getNodeGroupId(), parameterService.getExternalId()); } triggerRouterService.syncTriggers(); @@ -329,7 +329,7 @@ public synchronized boolean start(boolean startJobs) { } log.info( - "SymmetricDS: type=%s, name=%s, version=%s, groupId=%s, externalId=%s, databaseName=%s, databaseVersion=%s, driverName=%s, driverVersion=%s", + "SymmetricDS: type={}, name={}, version={}, groupId={}, externalId={}, databaseName={}, databaseVersion={}, driverName={}, driverVersion={}", new Object[] { getDeploymentType().getDeploymentType(), getEngineName(), Version.version(), getParameterService().getNodeGroupId(), getParameterService().getExternalId(), symmetricDialect.getName(), @@ -339,7 +339,7 @@ public synchronized boolean start(boolean startJobs) { } public synchronized void stop() { - log.info("Closing SymmetricDS externalId=%s version=%s database=%s", + log.info("Closing SymmetricDS externalId={} version={} database={}", new Object[] { getParameterService().getExternalId(), Version.version(), symmetricDialect.getName() }); if (jobManager != null) { @@ -425,7 +425,7 @@ public boolean isConfigured() { } else if (!isSelfConfigurable && node == null && StringUtils.isBlank(getParameterService().getRegistrationUrl())) { log.warn( - "Please set the property %s so this node may pull registration or manually insert configuration into the configuration tables", + "Please set the property {} so this node may pull registration or manually insert configuration into the configuration tables", ParameterConstants.REGISTRATION_URL); } else if (Constants.PLEASE_SET_ME.equals(getParameterService().getExternalId()) || Constants.PLEASE_SET_ME.equals(registrationUrl) @@ -435,7 +435,7 @@ public boolean isConfigured() { && (!node.getExternalId().equals(getParameterService().getExternalId()) || !node .getNodeGroupId().equals(getParameterService().getNodeGroupId()))) { log.warn( - "The configured state does not match recorded database state. The recorded external id is %s while the configured external id is %s. The recorded node group id is %s while the configured node group id is %s", + "The configured state does not match recorded database state. The recorded external id is {} while the configured external id is {}. The recorded node group id is {} while the configured node group id is {}", new Object[] { node.getExternalId(), getParameterService().getExternalId(), node.getNodeGroupId(), getParameterService().getNodeGroupId() }); @@ -448,7 +448,7 @@ public boolean isConfigured() { // Offline node detection is not disabled (-1) and the value is too // small (less than the heartbeat) log.warn( - "The %s property must be a longer period of time than the %s property. Otherwise, nodes will be taken offline before the heartbeat job has a chance to run", + "The {} property must be a longer period of time than the {} property. Otherwise, nodes will be taken offline before the heartbeat job has a chance to run", ParameterConstants.OFFLINE_NODE_DETECTION_PERIOD_MINUTES, ParameterConstants.HEARTBEAT_SYNC_ON_PUSH_PERIOD_SEC); diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/db/AbstractSymmetricDialect.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/db/AbstractSymmetricDialect.java index fd2c9961d2..9179d94096 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/db/AbstractSymmetricDialect.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/db/AbstractSymmetricDialect.java @@ -106,7 +106,7 @@ public AbstractSymmetricDialect(IParameterService parameterService, this.parameterService = parameterService; this.platform = platform; - log.info("The DbDialect being used is %s", this.getClass().getName()); + log.info("The DbDialect being used is {}", this.getClass().getName()); ISqlTemplate sqlTemplate = this.platform.getSqlTemplate(); this.databaseMajorVersion = sqlTemplate.getDatabaseMajorVersion(); @@ -183,7 +183,7 @@ protected void createRequiredFunctions() { this.platform.getSqlTemplate().update( triggerText.getFunctionSql(functions[i], funcName, platform.getDefaultSchema())); - log.info("Just installed %s", funcName); + log.info("Just installed {}", funcName); } } } @@ -270,7 +270,7 @@ final protected void logSql(String sql, StringBuilder sqlBuffer) { public void createTrigger(final StringBuilder sqlBuffer, final DataEventType dml, final Trigger trigger, final TriggerHistory hist, final Channel channel, final String tablePrefix, final Table table) { - log.info("Creating %s trigger for %s", hist.getTriggerNameForDmlType(dml), + log.info("Creating {} trigger for {}", hist.getTriggerNameForDmlType(dml), trigger.getSourceTableName()); String previousCatalog = null; @@ -291,10 +291,10 @@ public void createTrigger(final StringBuilder sqlBuffer, final DataEventType dml previousCatalog = switchCatalogForTriggerInstall(sourceCatalogName, transaction); try { - log.debug("Running: %s", triggerSql); + log.debug("Running: {}", triggerSql); transaction.execute(triggerSql); } catch (SqlException ex) { - log.error("Failed to create trigger: %s", triggerSql); + log.error("Failed to create trigger: {}", triggerSql); throw ex; } @@ -302,7 +302,7 @@ public void createTrigger(final StringBuilder sqlBuffer, final DataEventType dml try { transaction.execute(postTriggerDml); } catch (SqlException ex) { - log.error("Failed to create post trigger: %s", postTriggerDml); + log.error("Failed to create post trigger: {}", postTriggerDml); throw ex; } } @@ -468,7 +468,7 @@ protected boolean createTablesIfNecessary() { String alterSql = builder.alterDatabase(modelFromDatabase, modelFromXml); if (log.isDebugEnabled()) { - log.debug("Alter SQL Generated: %s", alterSql); + log.debug("Alter SQL Generated: {}", alterSql); } new SqlScript(alterSql, getPlatform().getSqlTemplate(), true, delimiter, null) .execute(); @@ -794,4 +794,4 @@ protected void close(ISqlTransaction transaction) { public String getTablePrefix() { return parameterService.getTablePrefix(); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/db/TriggerText.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/db/TriggerText.java index f0fca303cb..44ff0bcccf 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/db/TriggerText.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/db/TriggerText.java @@ -931,4 +931,4 @@ public String toString() { } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/ext/ExtensionPointManager.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/ext/ExtensionPointManager.java index 8e8888ee89..d79eea914d 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/ext/ExtensionPointManager.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/ext/ExtensionPointManager.java @@ -130,9 +130,9 @@ public List getExtensionPoints() { protected boolean registerExtension(String beanName, IExtensionPoint ext) { boolean installed = false; if (ext instanceof IBuiltInExtensionPoint) { - log.debug("Registering an extension point named %s of type '%s' with SymmetricDS", beanName, ext.getClass().getSimpleName()); + log.debug("Registering an extension point named {} of type '{}' with SymmetricDS", beanName, ext.getClass().getSimpleName()); } else { - log.info("Registering an extension point named %s of type '%s' with SymmetricDS", beanName, ext.getClass().getSimpleName()); + log.info("Registering an extension point named {} of type '{}' with SymmetricDS", beanName, ext.getClass().getSimpleName()); } if (ext instanceof ISyncUrlExtension) { @@ -255,4 +255,4 @@ public T getExtensionPoint(String name) { } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/io/DefaultOfflineClientListener.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/io/DefaultOfflineClientListener.java index 66174bcc3f..d59ca6b622 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/io/DefaultOfflineClientListener.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/io/DefaultOfflineClientListener.java @@ -55,7 +55,7 @@ public void unknownError(Node remoteNode, Exception ex) { } public void offline(Node remoteNode) { - log.warn("Could not connect to the transport: %s", + log.warn("Could not connect to the transport: {}", (remoteNode.getSyncUrl() == null ? parameterService.getRegistrationUrl() : remoteNode .getSyncUrl())); } @@ -73,4 +73,4 @@ public boolean isAutoRegister() { return true; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/AbstractJob.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/AbstractJob.java index 4dce3c1212..fb974e522f 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/AbstractJob.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/AbstractJob.java @@ -94,7 +94,7 @@ public boolean isAutoStartConfigured() { public void start() { if (this.scheduledJob == null) { - log.info("Starting %s", jobName); + log.info("Starting {}", jobName); if (!StringUtils.isBlank(cronExpression)) { this.scheduledJob = taskScheduler.schedule(this, new CronTrigger(cronExpression)); started = true; @@ -107,7 +107,7 @@ public void start() { this.timeBetweenRunsInMs); started = true; } else { - log.error("Failed to schedule this job, %s", jobName); + log.error("Failed to schedule this job, {}", jobName); } } } @@ -119,10 +119,10 @@ public boolean stop() { success = this.scheduledJob.cancel(true); this.scheduledJob = null; if (success) { - log.info("The %s job has been cancelled.", jobName); + log.info("The {} job has been cancelled.", jobName); started = false; } else { - log.warn("Failed to cancel this job, %s", jobName); + log.warn("Failed to cancel this job, {}", jobName); } } return success; @@ -141,7 +141,7 @@ public boolean invoke(boolean force) { boolean ran = false; try { if (engine == null) { - log.info("Could not find a reference to the SymmetricEngine from %s", jobName); + log.info("Could not find a reference to the SymmetricEngine from {}", jobName); } else if (engine.isStarted()) { if (!paused || force) { if (!running) { @@ -158,7 +158,7 @@ public boolean invoke(boolean force) { processCount = doJob(); } else { if (!hasNotRegisteredMessageBeenLogged) { - log.warn("Did not run the %s job because the engine is not registered.", getName()); + log.warn("Did not run the {} job because the engine is not registered.", getName()); hasNotRegisteredMessageBeenLogged = true; } } @@ -279,4 +279,4 @@ public long getTimeBetweenRunsInMs() { return timeBetweenRunsInMs; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/DefaultOfflineServerListener.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/DefaultOfflineServerListener.java index 4a2de356b1..c9d3f0f4dc 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/DefaultOfflineServerListener.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/DefaultOfflineServerListener.java @@ -55,7 +55,7 @@ public DefaultOfflineServerListener(IStatisticManager statisticManager, * outgoing batches. */ public void clientNodeOffline(Node node) { - log.warn("Node %s is offline. Last heartbeat was %s, timezone %s. Syncing will be disabled and node security deleted.", new Object[] {node.getNodeId(), node.getHeartbeatTime(), node.getTimezoneOffset()}); + log.warn("Node {} is offline. Last heartbeat was {}, timezone {}. Syncing will be disabled and node security deleted.", new Object[] {node.getNodeId(), node.getHeartbeatTime(), node.getTimezoneOffset()}); statisticManager.incrementNodesDisabled(1); node.setSyncEnabled(false); nodeService.updateNode(node); @@ -67,4 +67,4 @@ public boolean isAutoRegister() { return true; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/JobManager.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/JobManager.java index 014e0c53eb..fa01fed703 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/JobManager.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/JobManager.java @@ -77,7 +77,7 @@ public synchronized void startJobs() { if (job.isAutoStartConfigured()) { job.start(); } else { - log.info("Job %s not configured for auto start", job.getName()); + log.info("Job {} not configured for auto start", job.getName()); } } } @@ -98,4 +98,4 @@ public synchronized void destroy () { public List getJobs() { return jobs; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/PullJob.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/PullJob.java index 37566e3d86..cc7046bb98 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/PullJob.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/job/PullJob.java @@ -59,4 +59,4 @@ public boolean isClusterable() { return true; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/load/ConfigurationChangedFilter.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/load/ConfigurationChangedFilter.java index 0583d92204..abb66f515a 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/load/ConfigurationChangedFilter.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/load/ConfigurationChangedFilter.java @@ -147,4 +147,4 @@ public void batchCommitted( } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/AbstractDataRouter.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/AbstractDataRouter.java index 026503e919..b8b0da75ef 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/AbstractDataRouter.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/AbstractDataRouter.java @@ -240,6 +240,6 @@ protected Set toExternalIds(Set nodes) { * Override if needed. */ public void completeBatch(SimpleRouterContext context, OutgoingBatch batch) { - log.debug("Completing batch %d", batch.getBatchId()); + log.debug("Completing batch {}", batch.getBatchId()); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/BshDataRouter.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/BshDataRouter.java index 91437c1f00..b5bfb639ee 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/BshDataRouter.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/BshDataRouter.java @@ -114,4 +114,4 @@ protected void bind(Interpreter interpreter, DataMetaData dataMetaData, Set routeToNodes(SimpleRouterContext routingContext, } } else { - log.warn("There were no columns to match for the data_id of %d", dataMetaData.getData().getDataId()); + log.warn("There were no columns to match for the data_id of {}", dataMetaData.getData().getDataId()); } return nodeIds; @@ -185,14 +185,14 @@ protected List parse(String routerExpression) { if (tokens.length == 2) { expressions.add(new Expression(equals, tokens)); } else { - log.warn("The provided column match expression was invalid: %s. The full expression is %s.", t, routerExpression); + log.warn("The provided column match expression was invalid: {}. The full expression is {}.", t, routerExpression); } } } } } else { - log.warn("The provided column match expression was invalid: %s. The full expression is %s.", routerExpression, routerExpression); + log.warn("The provided column match expression was invalid: {}. The full expression is {}.", routerExpression, routerExpression); } return expressions; } @@ -218,4 +218,4 @@ public Expression(boolean equals, String[] tokens) { this.tokens = tokens; } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/DataGapDetector.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/DataGapDetector.java index adda6ce418..311f2a6258 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/DataGapDetector.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/DataGapDetector.java @@ -120,13 +120,13 @@ public void beforeRouting() { .getTime() + transactionViewClockSyncThresholdInMs)) { if (dataService.countDataInRange(dataGap.getStartId() - 1, dataGap.getEndId() + 1) == 0) { - log.info("Found a gap in data_id from %d to %d. Skipping it because there are no pending transactions in the database.", + log.info("Found a gap in data_id from {} to {}. Skipping it because there are no pending transactions in the database.", dataGap.getStartId(), dataGap.getEndId()); dataService.updateDataGap(dataGap, DataGap.Status.SK); } } } else if (isDataGapExpired(dataGap.getEndId() + 1)) { - log.info("Found a gap in data_id from %d to %d. Skipping it because the gap expired.", dataGap.getStartId(), + log.info("Found a gap in data_id from {} to {}. Skipping it because the gap expired.", dataGap.getStartId(), dataGap.getEndId()); dataService.updateDataGap(dataGap, DataGap.Status.SK); } @@ -143,7 +143,7 @@ public void beforeRouting() { long updateTimeInMs = System.currentTimeMillis() - ts; if (updateTimeInMs > 10000) { - log.info("Detecting gaps took %d ms", updateTimeInMs); + log.info("Detecting gaps took {} ms", updateTimeInMs); } } @@ -180,4 +180,4 @@ protected boolean isDataGapExpired(long dataId) { } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/DataGapRouteReader.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/DataGapRouteReader.java index 61019e2997..6cd5544460 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/DataGapRouteReader.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/DataGapRouteReader.java @@ -309,10 +309,10 @@ protected ResultSet executeQuery(PreparedStatement ps) throws SQLException { long executeTimeInMs = System.currentTimeMillis() - ts; context.incrementStat(executeTimeInMs, ChannelRouterContext.STAT_QUERY_TIME_MS); if (executeTimeInMs > Constants.LONG_OPERATION_THRESHOLD) { - log.warn("Selected data to route in %d ms for %s", executeTimeInMs, context.getChannel() + log.warn("Selected data to route in {} ms for {}", executeTimeInMs, context.getChannel() .getChannelId()); } else if (log.isDebugEnabled()) { - log.debug("Selected data to route in %d ms for %s", executeTimeInMs, context.getChannel() + log.debug("Selected data to route in {} ms for {}", executeTimeInMs, context.getChannel() .getChannelId()); } return rs; @@ -343,4 +343,4 @@ class EOD extends Data { private static final long serialVersionUID = 1L; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/LookupTableDataRouter.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/LookupTableDataRouter.java index a44c7105ee..4236acec36 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/LookupTableDataRouter.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/LookupTableDataRouter.java @@ -86,7 +86,7 @@ public Set routeToNodes(SimpleRouterContext routingContext, DataMetaData } } else { - log.warn("The provided table mapped router expression was invalid: %s.", router.getRouterExpression()); + log.warn("The provided table mapped router expression was invalid: {}.", router.getRouterExpression()); } return nodeIds; @@ -153,4 +153,4 @@ public Object mapRow(Row rs) { return lookupMap; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/SimpleRouterContext.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/SimpleRouterContext.java index 985f4b8cb3..65bae7f459 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/SimpleRouterContext.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/route/SimpleRouterContext.java @@ -105,9 +105,9 @@ synchronized public void logStats(Logger log, long totalTimeInMs) { } if (infoLevel) { - log.info("Routing %s", statsPrintout); + log.info("Routing {}", statsPrintout); } else { - log.debug("Routing %s", statsPrintout); + log.debug("Routing {}", statsPrintout); } } @@ -122,4 +122,4 @@ synchronized public void transferStats(SimpleRouterContext ctx) { incrementStat(value, key); } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/AcknowledgeService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/AcknowledgeService.java index 4e2fab7886..72babb1299 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/AcknowledgeService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/AcknowledgeService.java @@ -86,7 +86,7 @@ public void ack(final BatchInfo batch) { // clearing the error flag in case the user set the batch // status to OK outgoingBatch.setErrorFlag(false); - log.warn("Batch %d was already set to OK. Not updating to %s.", batch.getBatchId(), status.name()); + log.warn("Batch {} was already set to OK. Not updating to {}.", batch.getBatchId(), status.name()); } outgoingBatch.setNetworkMillis(batch.getNetworkMillis()); outgoingBatch.setFilterMillis(batch.getFilterMillis()); @@ -105,13 +105,13 @@ public void ack(final BatchInfo batch) { } if (status == Status.ER) { - log.error("Received an error from node %s for batch %d. Check the outgoing_batch table for more info.", outgoingBatch.getNodeId(), + log.error("Received an error from node {} for batch {}. Check the outgoing_batch table for more info.", outgoingBatch.getNodeId(), outgoingBatch.getBatchId()); } outgoingBatchService.updateOutgoingBatch(outgoingBatch); } else { - log.error("Could not find batch %d to acknowledge as %s", batch.getBatchId(), status.name()); + log.error("Could not find batch {} to acknowledge as {}", batch.getBatchId(), status.name()); } } } @@ -123,4 +123,4 @@ public void addAcknowledgeEventListener(IAcknowledgeEventListener statusChangeLi } batchEventListeners.add(statusChangeListner); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/BandwidthService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/BandwidthService.java index 165e1b2b20..5589a23385 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/BandwidthService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/BandwidthService.java @@ -55,7 +55,7 @@ public double getDownloadKbpsFor(String syncUrl, long sampleSize, long maxTestDu BandwidthTestResults bw = getDownloadResultsFor(syncUrl, sampleSize, maxTestDuration); downloadSpeed = (int) bw.getKbps(); } catch (SocketTimeoutException e) { - log.warn("Socket timeout while attempting to contact %s", syncUrl); + log.warn("Socket timeout while attempting to contact {}", syncUrl); } catch (Exception e) { log.error(e.getMessage(), e); } @@ -82,7 +82,7 @@ protected BandwidthTestResults getDownloadResultsFor(String syncUrl, long sample } is.close(); bw.stop(); - log.info("%s was calculated to have a download bandwidth of %s kbps", syncUrl, bw.getKbps()); + log.info("{} was calculated to have a download bandwidth of {} kbps", syncUrl, bw.getKbps()); return bw; } finally { IOUtils.closeQuietly(is); @@ -98,4 +98,4 @@ protected void setBasicAuthIfNeeded(HttpURLConnection conn) { } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/ClusterService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/ClusterService.java index 9b8025e1fe..532d726e55 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/ClusterService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/ClusterService.java @@ -73,10 +73,10 @@ public void initLockTable() { public void initLockTable(final String action) { try { sqlTemplate.update(getSql("insertLockSql"), new Object[] { action }); - log.debug("Inserted into the NODE_LOCK table for %s", action); + log.debug("Inserted into the NODE_LOCK table for {}", action); } catch (UniqueKeyException ex) { - log.debug("Failed to insert to the NODE_LOCK table for %s. Must be initialized already.", action); + log.debug("Failed to insert to the NODE_LOCK table for {}. Must be initialized already.", action); } } @@ -126,7 +126,7 @@ public String getServerId() { public void unlock(final String action) { if (isClusteringEnabled()) { if (!unlock(action, serverId)) { - log.warn("Failed to release lock for action:%s server:%s", action, serverId); + log.warn("Failed to release lock for action:{} server:{}", action, serverId); } } } @@ -160,4 +160,4 @@ protected AbstractSqlMap createSqlMap() { return new ClusterServiceSqlMap(symmetricDialect.getPlatform(), createSqlReplacementTokens()); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/ConfigurationService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/ConfigurationService.java index d2915a9920..a93cdd0cc7 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/ConfigurationService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/ConfigurationService.java @@ -337,10 +337,10 @@ protected void autoConfigChannels() { List channels = getNodeChannels(false); for (Channel defaultChannel : defaultChannels) { if (!defaultChannel.isInList(channels)) { - log.info("Auto-configuring %s channel.", defaultChannel.getChannelId()); + log.info("Auto-configuring {} channel.", defaultChannel.getChannelId()); saveChannel(defaultChannel, true); } else { - log.debug("No need to create channel %s. It already exists.", defaultChannel.getChannelId()); + log.debug("No need to create channel {}. It already exists.", defaultChannel.getChannelId()); } } reloadChannels(); @@ -365,7 +365,7 @@ protected void autoConfigRegistrationServer() { try { nodeService.insertNode(nodeId, nodeGroupId, nodeId, nodeId); } catch (UniqueKeyException ex) { - log.warn("Not inserting node row for %s because it already exists", nodeId); + log.warn("Not inserting node row for {} because it already exists", nodeId); } nodeService.insertNodeIdentity(nodeId); node = nodeService.findIdentity(); @@ -402,7 +402,7 @@ private boolean buildTablesFromDdlUtilXmlIfProvided() { if (fileUrl != null) { try { - log.info("Building database schema from: %s", xml); + log.info("Building database schema from: {}", xml); Database database = new DatabaseIO().read(new InputStreamReader(fileUrl .openStream())); IDatabasePlatform platform = symmetricDialect.getPlatform(); @@ -534,4 +534,4 @@ public Map getRegistrationRedirectMap() { "registrant_external_id", "registration_node_id"); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataExtractorService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataExtractorService.java index 81ee3ed24a..2e1056e669 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataExtractorService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataExtractorService.java @@ -200,7 +200,7 @@ public void extractConfigurationStandalone(Node node, Writer writer, String... t processor.process(); if (triggerRouters.size() == 0) { - log.error("%s attempted registration, but was sent an empty configuration", node); + log.error("{} attempted registration, but was sent an empty configuration", node); } } @@ -237,7 +237,7 @@ private List filterBatchesForExtraction(OutgoingBatches batches, for (OutgoingBatch batch : ignoredBatches) { batch.setStatus(OutgoingBatch.Status.IG); if (log.isDebugEnabled()) { - log.debug("Batch %s is being ignored", batch.getBatchId()); + log.debug("Batch {} is being ignored", batch.getBatchId()); } } @@ -320,7 +320,7 @@ public void end(Batch batch, IoResource resource) { IoResource previouslyExtracted = extractedBatchesHandle .get(currentBatch.getBatchId()); if (previouslyExtracted != null && previouslyExtracted.exists()) { - log.info("We have already extracted batch %d. Using the existing extraction. To force re-extraction, please restart this instance of SymmetricDS.", + log.info("We have already extracted batch {}. Using the existing extraction. To force re-extraction, please restart this instance of SymmetricDS.", currentBatch.getBatchId()); } else { outgoingBatch.setStatus(OutgoingBatch.Status.QY); @@ -662,4 +662,4 @@ public void close() { } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataLoaderService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataLoaderService.java index 539094d5ef..b958c52a3d 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataLoaderService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataLoaderService.java @@ -161,7 +161,7 @@ public void loadDataFromPull(Node remote, RemoteNodeStatus status) throws IOExce } else { transport = transportManager.getRegisterTransport(local, parameterService.getRegistrationUrl()); - log.info("Using registration URL of %s", transport.getUrl()); + log.info("Using registration URL of {}", transport.getUrl()); remote = new Node(); remote.setSyncUrl(parameterService.getRegistrationUrl()); } @@ -188,7 +188,7 @@ public void loadDataFromPull(Node remote, RemoteNodeStatus status) throws IOExce loadDataFromPull(null, status); nodeService.findIdentity(false); } catch (MalformedURLException e) { - log.error("Could not connect to the %s node's transport because of a bad URL: %s", + log.error("Could not connect to the {} node's transport because of a bad URL: {}", remote.getNodeId(), remote.getSyncUrl()); throw e; } @@ -208,11 +208,11 @@ private void sendAck(Node remote, Node local, NodeSecurity localSecurity, sendAck = transportManager.sendAcknowledgement(remote, list, local, localSecurity.getNodePassword(), parameterService.getRegistrationUrl()); } catch (IOException ex) { - log.warn("Ack was not sent successfully on try number %d. %s", (i + 1), + log.warn("Ack was not sent successfully on try number {}. {}", (i + 1), ex.getMessage()); error = ex; } catch (RuntimeException ex) { - log.warn("Ack was not sent successfully on try number %d. %s", (i + 1), + log.warn("Ack was not sent successfully on try number {}. {}", (i + 1), ex.getMessage()); error = ex; } @@ -293,7 +293,7 @@ public void end(Batch batch, IoResource resource) { for (IncomingBatch incomingBatch : batchesProcessed) { if (incomingBatch.getBatchId() != BatchInfo.VIRTUAL_BATCH_FOR_REGISTRATION && incomingBatchService.updateIncomingBatch(incomingBatch) == 0) { - log.error("Failed to update batch %d. Zero rows returned.", + log.error("Failed to update batch {}. Zero rows returned.", incomingBatch.getBatchId()); } } @@ -303,7 +303,7 @@ public void end(Batch batch, IoResource resource) { } catch (ConnectException ex) { throw ex; } catch (UnknownHostException ex) { - log.warn("Could not connect to the transport because the host was unknown: %s", + log.warn("Could not connect to the transport because the host was unknown: {}", ex.getMessage()); throw ex; } catch (RegistrationNotOpenException ex) { @@ -318,9 +318,9 @@ public void end(Batch batch, IoResource resource) { throw ex; } catch (IOException ex) { if (ex.getMessage() != null && !ex.getMessage().startsWith("http")) { - log.error("Failed while reading batch because: %s", ex.getMessage()); + log.error("Failed while reading batch because: {}", ex.getMessage()); } else { - log.error("Failed while reading batch because: %s", ex.getMessage(), ex); + log.error("Failed while reading batch because: {}", ex.getMessage(), ex); } throw ex; } catch (Exception ex) { @@ -484,11 +484,11 @@ public void batchInError(DataContext conte enableSyncTriggers(context); statisticManager.incrementDataLoadedErrors(this.currentBatch.getChannelId(), 1); if (ex instanceof IOException || ex instanceof TransportException) { - log.warn("Failed to load batch %s because: %s", + log.warn("Failed to load batch {} because: {}", this.currentBatch.getNodeBatchId(), ex.getMessage()); this.currentBatch.setSqlMessage(ex.getMessage()); } else { - log.error("Failed to load batch %s because: %s", new Object[] { + log.error("Failed to load batch {} because: {}", new Object[] { this.currentBatch.getNodeBatchId(), ex.getMessage() }); log.error(ex.getMessage(), ex); SQLException se = unwrapSqlException(ex); @@ -509,7 +509,7 @@ public void batchInError(DataContext conte } incomingBatchService.updateIncomingBatch(this.currentBatch); } catch (Exception e) { - log.error("Failed to record status of batch %s", + log.error("Failed to record status of batch {}", this.currentBatch != null ? this.currentBatch.getNodeBatchId() : context .getBatch().getNodeBatchId()); } @@ -528,4 +528,4 @@ public void setTransformService(ITransformService transformService) { this.transformService = transformService; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataService.java index e84ba3e4b6..265ed2e95f 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataService.java @@ -212,7 +212,7 @@ public void checkForAndUpdateMissingChannelIds(long firstDataId, long lastDataId Constants.CHANNEL_DEFAULT, firstDataId, lastDataId); if (numberUpdated > 0) { log.warn( - "There were %d data records found between %d and %d that an invalid channel_id. Updating them to be on the '%s' channel.", + "There were {} data records found between {} and {} that an invalid channel_id. Updating them to be on the '{}' channel.", new Object[] { numberUpdated, firstDataId, lastDataId, Constants.CHANNEL_DEFAULT }); } @@ -277,7 +277,7 @@ protected void insertDataEvent(ISqlTransaction transaction, long dataId, long ba StringUtils.isBlank(routerId) ? Constants.UNKNOWN_ROUTER_ID : routerId }, new int[] { Types.NUMERIC, Types.NUMERIC, Types.VARCHAR }); } catch (RuntimeException ex) { - log.error("Could not insert a data event: data_id=%d batch_id=%d router_id=%s", + log.error("Could not insert a data event: data_id={} batch_id={} router_id={}", new Object[] { dataId, batchId, routerId }); log.error(ex.getMessage(), ex); throw ex; @@ -522,12 +522,12 @@ public void insertHeartbeatEvent(Node node, boolean isReload) { insertData(data); } else { log.warn( - "Not generating data/data events for table %s because a trigger or trigger hist is not created yet.", + "Not generating data/data events for table {} because a trigger or trigger hist is not created yet.", tableName); } } else { log.warn( - "Not generating data/data events for table %s because a trigger or trigger hist is not created yet.", + "Not generating data/data events for table {} because a trigger or trigger hist is not created yet.", tableName); } } @@ -629,7 +629,7 @@ public void insertDataGap(DataGap gap) { AppUtils.getHostName(), gap.getStartId(), gap.getEndId() }, new int[] { Types.VARCHAR, Types.VARCHAR, Types.NUMERIC, Types.NUMERIC }); } catch (UniqueKeyException ex) { - log.warn("A gap already existed for %d to %d. Updating instead.", gap.getStartId(), + log.warn("A gap already existed for {} to {}. Updating instead.", gap.getStartId(), gap.getEndId()); updateDataGap(gap, DataGap.Status.GP); } @@ -846,4 +846,4 @@ public long findMaxDataId() { return sqlTemplate.queryForLong(getSql("selectMaxDataIdSql")); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/IncomingBatchService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/IncomingBatchService.java index 29f644724d..d7dd59b4a3 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/IncomingBatchService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/IncomingBatchService.java @@ -159,12 +159,12 @@ public boolean acquireIncomingBatch(IncomingBatch batch) { .is(ParameterConstants.INCOMING_BATCH_SKIP_DUPLICATE_BATCHES_ENABLED)) { okayToProcess = true; existingBatch.setStatus(Status.LD); - log.warn("Retrying batch %s", batch.getNodeBatchId()); + log.warn("Retrying batch {}", batch.getNodeBatchId()); } else { okayToProcess = false; existingBatch.setStatus(existingBatch.getStatus()); existingBatch.setSkipCount(existingBatch.getSkipCount() + 1); - log.warn("Skipping batch %s", batch.getNodeBatchId()); + log.warn("Skipping batch {}", batch.getNodeBatchId()); } updateIncomingBatch(existingBatch); } @@ -245,4 +245,4 @@ public IncomingBatch mapRow(Row rs) { } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/NodeService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/NodeService.java index 9f059c7052..b642cb547e 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/NodeService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/NodeService.java @@ -211,7 +211,7 @@ public NodeSecurity findNodeSecurity(String nodeId, boolean createIfNotFound) { } } catch (UniqueKeyException ex) { log.error( - "Could not find a node security row for %s. A node needs a matching security row in both the local and remote nodes if it is going to authenticate to push data.", + "Could not find a node security row for {}. A node needs a matching security row in both the local and remote nodes if it is going to authenticate to push data.", nodeId); throw ex; } @@ -469,7 +469,7 @@ public DataLoadStatus mapRow(Row rs) { } return NodeStatus.DATA_LOAD_NOT_STARTED; } catch (CannotAcquireLockException ex) { - log.error("Could not acquire lock on the table after %s ms. The status is unknown.", + log.error("Could not acquire lock on the table after {} ms. The status is unknown.", (System.currentTimeMillis() - ts)); return NodeStatus.STATUS_UNKNOWN; } @@ -644,4 +644,4 @@ public NodeHost mapRow(Row rs) { } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchService.java index be3abd91a5..c586f1c1ea 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchService.java @@ -260,7 +260,7 @@ maxNumberOfBatchesToSelect, new OutgoingBatchMapper(), long executeTimeInMs = System.currentTimeMillis() - ts; if (executeTimeInMs > Constants.LONG_OPERATION_THRESHOLD) { - log.warn("%s took %d ms", "selecting batches to extract", executeTimeInMs); + log.warn("{} took {} ms", "selecting batches to extract", executeTimeInMs); } return batches; @@ -388,4 +388,4 @@ public void setConfigurationService(IConfigurationService configurationService) this.configurationService = configurationService; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/ParameterService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/ParameterService.java index 1ac19c7bbd..267cb35d7a 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/ParameterService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/ParameterService.java @@ -319,4 +319,4 @@ public String getEngineName() { return getString(ParameterConstants.ENGINE_NAME, "SymmetricDS"); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/PullService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/PullService.java index 98b8e75440..44a5e74905 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/PullService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/PullService.java @@ -85,14 +85,14 @@ synchronized public RemoteNodeStatuses pullData() { for (Node node : nodes) { RemoteNodeStatus status = statuses.add(node); try { - log.debug("Pull requested for %s", node.toString()); + log.debug("Pull requested for {}", node.toString()); dataLoaderService.loadDataFromPull(node, status); if (status.getDataProcessed() > 0 || status.getBatchesProcessed() > 0) { - log.info("Pull data received from %s. %d rows and %d batches were processed.", new Object[] { node.toString(), status.getDataProcessed(), + log.info("Pull data received from {}. {} rows and {} batches were processed.", new Object[] { node.toString(), status.getDataProcessed(), status.getBatchesProcessed() }); } else { - log.debug("Pull data received from %s. %d rows and %d batches were processed.", new Object[] {node.toString(), status.getDataProcessed(), + log.debug("Pull data received from {}. {} rows and {} batches were processed.", new Object[] {node.toString(), status.getDataProcessed(), status.getBatchesProcessed()}); } } catch (ConnectException ex) { @@ -111,10 +111,10 @@ synchronized public RemoteNodeStatuses pullData() { log.warn("."); fireOffline(ex, node, status); } catch (SocketException ex) { - log.warn("%s", ex.getMessage()); + log.warn("{}", ex.getMessage()); fireOffline(ex, node, status); } catch (TransportException ex) { - log.warn("%s", ex.getMessage()); + log.warn("{}", ex.getMessage()); fireOffline(ex, node, status); } catch (IOException ex) { log.error(ex.getMessage(),ex); @@ -134,4 +134,4 @@ synchronized public RemoteNodeStatuses pullData() { return statuses; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/PurgeService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/PurgeService.java index 7b4e38f8f5..3b4bc4b2df 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/PurgeService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/PurgeService.java @@ -99,7 +99,7 @@ public long purgeDataGaps(Calendar retentionCutoff) { log.info("The data gap purge process is about to run"); rowsPurged = sqlTemplate.update(getSql("deleteFromDataGapsSql"), new Object[] { retentionCutoff.getTime() }); - log.info("Purged %d data gap rows", rowsPurged); + log.info("Purged {} data gap rows", rowsPurged); } finally { clusterService.unlock(ClusterConstants.PURGE_DATA_GAPS); log.info("The data gap purge process has completed"); @@ -119,7 +119,7 @@ public long purgeOutgoing(Calendar retentionCutoff) { try { if (clusterService.lock(ClusterConstants.PURGE_OUTGOING)) { try { - log.info("The outgoing purge process is about to run for data older than %s", + log.info("The outgoing purge process is about to run for data older than {}", SimpleDateFormat.getDateTimeInstance() .format(retentionCutoff.getTime())); rowsPurged += purgeStrandedBatches(); @@ -160,7 +160,7 @@ private long purgeStrandedBatches() { int updateStrandedBatchesCount = sqlTemplate.update(getSql("updateStrandedBatches")); if (updateStrandedBatchesCount > 0) { log.info( - "Set the status to OK for %d batches that no longer are associated with valid nodes", + "Set the status to OK for {} batches that no longer are associated with valid nodes", updateStrandedBatchesCount); statisticManager.incrementPurgedBatchOutgoingRows(updateStrandedBatchesCount); } @@ -172,7 +172,7 @@ private long purgeUnroutedDataEvents(Date time) { new Timestamp(time.getTime())); if (unroutedDataEventCount > 0) { statisticManager.incrementPurgedDataEventRows(unroutedDataEventCount); - log.info("Done purging %d of %s rows", unroutedDataEventCount, "unrouted data_event"); + log.info("Done purging {} of {} rows", unroutedDataEventCount, "unrouted data_event"); } return unroutedDataEventCount; } @@ -209,7 +209,7 @@ private int purgeByMinMax(long[] minMax, MinMaxDeleteSql identifier, Date retent int totalCount = 0; int totalDeleteStmts = 0; Timestamp cutoffTime = new Timestamp(retentionTime.getTime()); - log.info("About to purge %s", identifier.toString().toLowerCase()); + log.info("About to purge {}", identifier.toString().toLowerCase()); while (minId <= purgeUpToId) { totalDeleteStmts++; long maxId = minId + maxNumtoPurgeinTx; @@ -243,13 +243,13 @@ private int purgeByMinMax(long[] minMax, MinMaxDeleteSql identifier, Date retent if (totalCount > 0 && (System.currentTimeMillis() - ts > DateUtils.MILLIS_PER_MINUTE * 5)) { - log.info("Purged %d of %s rows so far using %d statements", new Object[] { + log.info("Purged {} of {} rows so far using {} statements", new Object[] { totalCount, identifier.toString().toLowerCase(), totalDeleteStmts }); ts = System.currentTimeMillis(); } minId = maxId + 1; } - log.info("Done purging %d of %s rows", totalCount, identifier.toString().toLowerCase()); + log.info("Done purging {} of {} rows", totalCount, identifier.toString().toLowerCase()); return totalCount; } @@ -293,7 +293,7 @@ private int purgeByNodeBatchRangeList(String deleteSql, List nod int totalCount = 0; int totalDeleteStmts = 0; String tableName = deleteSql.trim().split("\\s")[2]; - log.info("About to purge %s", tableName); + log.info("About to purge {}", tableName); for (NodeBatchRange nodeBatchRange : nodeBatchRangeList) { int maxNumOfDataIdsToPurgeInTx = parameterService @@ -314,12 +314,12 @@ private int purgeByNodeBatchRangeList(String deleteSql, List nod if (totalCount > 0 && (System.currentTimeMillis() - ts > DateUtils.MILLIS_PER_MINUTE * 5)) { - log.info("Purged %d of %s rows so far using %d statements", new Object[] {totalCount, tableName, + log.info("Purged {} of {} rows so far using {} statements", new Object[] {totalCount, tableName, totalDeleteStmts}); ts = System.currentTimeMillis(); } } - log.info("Done purging %d of %s rows", totalCount, tableName); + log.info("Done purging {} of {} rows", totalCount, tableName); return totalCount; } @@ -352,7 +352,7 @@ public long getMinBatchId() { public void purgeAllIncomingEventsForNode(String nodeId) { int count = sqlTemplate.update(getSql("deleteIncomingBatchByNodeSql"), new Object[] { nodeId }); - log.info("Purged all %d incoming batch for node %s", count, nodeId); + log.info("Purged all {} incoming batch for node {}", count, nodeId); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/PushService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/PushService.java index c4982c5e3b..0f5ec2897c 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/PushService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/PushService.java @@ -90,18 +90,18 @@ synchronized public RemoteNodeStatuses pushData() { if (nodes != null && nodes.size() > 0) { if (identitySecurity != null) { for (Node node : nodes) { - log.debug("Push requested for %s", node); + log.debug("Push requested for {}", node); RemoteNodeStatus status = pushToNode(node, identity, identitySecurity); statuses.add(status); if (status.getBatchesProcessed() > 0) { - log.info("Pushed data to %s", node); + log.info("Pushed data to {}", node); } else if (status.failed()) { log.warn("There was an error while pushing data to the server"); } - log.debug("Push completed for %s", node); + log.debug("Push completed for {}", node); } } else { - log.error("Could not find a node security row for %s. A node needs a matching security row in both the local and remote nodes if it is going to authenticate to push data.", identity.getNodeId()); + log.error("Could not find a node security row for {}. A node needs a matching security row in both the local and remote nodes if it is going to authenticate to push data.", identity.getNodeId()); } } } finally { @@ -123,13 +123,13 @@ private RemoteNodeStatus pushToNode(Node remote, Node identity, NodeSecurity ide List extractedBatches = dataExtractorService.extract(remote, transport); if (extractedBatches.size() > 0) { - log.info("Push data sent to %s", remote); + log.info("Push data sent to {}", remote); BufferedReader reader = transport.readResponse(); String ackString = reader.readLine(); String ackExtendedString = reader.readLine(); - log.debug("Reading ack: %s", ackString); - log.debug("Reading extend ack: %s", ackExtendedString); + log.debug("Reading ack: {}", ackString); + log.debug("Reading extend ack: {}", ackExtendedString); if (StringUtils.isBlank(ackString)) { log.error("Did not receive an acknowledgement for the batches sent."); @@ -139,7 +139,7 @@ private RemoteNodeStatus pushToNode(Node remote, Node identity, NodeSecurity ide ackExtendedString); for (BatchInfo batchInfo : batches) { - log.debug("Saving ack: %s, %s", batchInfo.getBatchId(), (batchInfo.isOk() ? "OK" + log.debug("Saving ack: {}, {}", batchInfo.getBatchId(), (batchInfo.isOk() ? "OK" : "error")); acknowledgeService.ack(batchInfo); } @@ -155,10 +155,10 @@ private RemoteNodeStatus pushToNode(Node remote, Node identity, NodeSecurity ide log.warn("."); fireOffline(ex, remote, status); } catch (SocketException ex) { - log.warn("%s", ex.getMessage()); + log.warn("{}", ex.getMessage()); fireOffline(ex, remote, status); } catch (TransportException ex) { - log.warn("%s", ex.getMessage()); + log.warn("{}", ex.getMessage()); fireOffline(ex, remote, status); } catch (AuthenticationException ex) { log.warn("."); @@ -188,4 +188,4 @@ protected AbstractSqlMap createSqlMap() { return null; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/RegistrationService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/RegistrationService.java index 84b228452e..6b7e5ee724 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/RegistrationService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/RegistrationService.java @@ -116,7 +116,7 @@ public boolean registerNode(Node node, String remoteHost, String remoteAddress, String redirectUrl = getRedirectionUrlFor(node.getExternalId()); if (redirectUrl != null) { - log.info("Redirecting %s to %s for registration.", node.getExternalId(), redirectUrl); + log.info("Redirecting {} to {} for registration.", node.getExternalId(), redirectUrl); saveRegisgtrationRequest(new RegistrationRequest(node, RegistrationStatus.RR, remoteHost, remoteAddress)); throw new RegistrationRedirectException(redirectUrl); @@ -237,7 +237,7 @@ private void sleepBeforeRegistrationRetry() { try { long sleepTimeInMs = DateUtils.MILLIS_PER_SECOND * randomTimeSlot.getRandomValueSeededByExternalId(); - log.warn("Could not register. Sleeping for %d ms before attempting again.", + log.warn("Could not register. Sleeping for {} ms before attempting again.", sleepTimeInMs); Thread.sleep(sleepTimeInMs); } catch (InterruptedException e) { @@ -275,7 +275,7 @@ public void registerWithServer() { } else { Node node = nodeService.findIdentity(); if (node != null) { - log.info("Successfully registered node [id=%s]", node.getNodeId()); + log.info("Successfully registered node [id={}]", node.getNodeId()); } else if (!errorOccurred) { log.error("Node identity is missing after registration. The registration server may be misconfigured or have an error."); registered = false; @@ -315,7 +315,7 @@ public synchronized void reOpenRegistration(String nodeId) { nodeId, password, nodeService.findNode(nodeId).getNodeId() }); } } else { - log.warn("There was no row with a node id of %s to 'reopen' registration for.", nodeId); + log.warn("There was no row with a node id of {} to 'reopen' registration for.", nodeId); } } @@ -350,7 +350,7 @@ protected synchronized String openRegistration(Node node) { nodeId, password, me.getNodeId() }); nodeService.insertNodeGroup(node.getNodeGroupId(), null); log.info( - "Just opened registration for external id of %s and a node group of %s and a node id of %s", + "Just opened registration for external id of {} and a node group of {} and a node id of {}", new Object[] { node.getExternalId(), node.getNodeGroupId(), nodeId }); } else { reOpenRegistration(nodeId); @@ -438,4 +438,4 @@ public RegistrationRequest mapRow(Row rs) { return request; } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/RouterService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/RouterService.java index f138290a17..985c301a43 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/RouterService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/RouterService.java @@ -202,7 +202,7 @@ synchronized public long routeData() { gapDetector.afterRouting(); ts = System.currentTimeMillis() - ts; if (dataCount > 0 || ts > Constants.LONG_OPERATION_THRESHOLD) { - log.info("Routed %d data events in %d ms", dataCount, ts); + log.info("Routed {} data events in {} ms", dataCount, ts); } } finally { clusterService.unlock(ClusterConstants.ROUTE); @@ -227,10 +227,10 @@ protected void insertInitialLoadEvents() { .getNodeId())); ts = System.currentTimeMillis() - ts; if (ts > Constants.LONG_OPERATION_THRESHOLD) { - log.warn("Inserted reload events for node %s in %d ms", + log.warn("Inserted reload events for node {} in {} ms", security.getNodeId(), ts); } else { - log.info("Inserted reload events for node %s in %d ms", + log.info("Inserted reload events for node {} in {} ms", security.getNodeId(), ts); } } @@ -257,7 +257,7 @@ protected int routeDataForEachChannel() { dataCount += routeDataForChannel(nodeChannel, sourceNode); } else { if (log.isDebugEnabled()) { - log.debug("Not routing the %s channel. It is either disabled or suspended.", + log.debug("Not routing the {} channel. It is either disabled or suspended.", nodeChannel.getChannelId()); } } @@ -275,7 +275,7 @@ protected int routeDataForChannel(final NodeChannel nodeChannel, final Node sour dataCount = selectDataAndRoute(context); return dataCount; } catch (Exception ex) { - log.error("Failed to route and batch data on '%s' channel", ex, + log.error("Failed to route and batch data on '{}' channel", ex, nodeChannel.getChannelId()); if (context != null) { context.rollback(); @@ -299,7 +299,7 @@ protected int routeDataForChannel(final NodeChannel nodeChannel, final Node sour context.getLastDataIdProcessed()); queryTs = System.currentTimeMillis() - queryTs; if (queryTs > Constants.LONG_OPERATION_THRESHOLD) { - log.warn("Unrouted query for channel %s took %d ms", channelId, queryTs); + log.warn("Unrouted query for channel {} took {} ms", channelId, queryTs); } statisticManager.setDataUnRouted(channelId, dataLeftToRoute); } @@ -354,7 +354,7 @@ protected Set findAvailableNodes(TriggerRouter triggerRouter, ChannelRoute nodes.addAll(nodeService.findEnabledNodesFromNodeGroup(router.getNodeGroupLink() .getTargetNodeGroupId())); } else { - log.error("The router %s has no node group link configured from %s to %s", + log.error("The router {} has no node group link configured from {} to {}", new Object[] { router.getRouterId(), router.getNodeGroupLink().getSourceNodeGroupId(), router.getNodeGroupLink().getTargetNodeGroupId() }); @@ -471,7 +471,7 @@ protected int routeData(Data data, ChannelRouterContext context) throws SQLExcep } else { log.warn( - "Could not find trigger for trigger id of %s. Not processing data with the id of %s", + "Could not find trigger for trigger id of {}. Not processing data with the id of {}", data.getTriggerHistory().getTriggerId(), data.getDataId()); } @@ -519,7 +519,7 @@ protected IDataRouter getDataRouter(TriggerRouter trigger) { router = routers.get(trigger.getRouter().getRouterType()); if (router == null) { log.warn( - "Could not find configured router '%s' for trigger with the id of %s. Defaulting the router", + "Could not find configured router '{}' for trigger with the id of {}. Defaulting the router", trigger.getRouter().getRouterType(), trigger.getTrigger().getTriggerId()); } } @@ -542,7 +542,7 @@ protected List getTriggerRoutersForData(Data data) { } } else { log.warn( - "Could not find a trigger hist record for recorded data %d. Was the trigger hist record deleted manually?", + "Could not find a trigger hist record for recorded data {}. Was the trigger hist record deleted manually?", data.getDataId()); } } @@ -581,4 +581,4 @@ protected AbstractSqlMap createSqlMap() { return new RouterServiceSqlMap(symmetricDialect.getPlatform(), createSqlReplacementTokens()); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/SecurityService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/SecurityService.java index 6bb5cd571f..b2a3a98340 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/SecurityService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/SecurityService.java @@ -125,4 +125,4 @@ protected void saveKeyStore(KeyStore ks, String password) throws Exception { os.close(); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/TriggerRouterService.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/TriggerRouterService.java index 5eff1c9a42..e04eb606b4 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/TriggerRouterService.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/TriggerRouterService.java @@ -271,7 +271,7 @@ private String getMajorVersion(String version) { if (tables == null) { String newestVersion = getNewestVersionOfRootConfigChannelTableNames(); log.warn( - "Defaulting to major version %s because %s version was not valid while retrieving trigger configuration tables", + "Defaulting to major version {} because {} version was not valid while retrieving trigger configuration tables", newestVersion, majorVersion); majorVersion = newestVersion; } @@ -429,7 +429,7 @@ protected List getConfigurationTablesTriggerRoutersForCurrentNode triggers.add(buildRegistrationTriggerRouter(Version.version(), TableConstants.getTableName(tablePrefix, TableConstants.SYM_NODE_HOST), true, nodeGroupLink)); - log.debug("Creating trigger hist entry for %s", + log.debug("Creating trigger hist entry for {}", TableConstants.getTableName(tablePrefix, TableConstants.SYM_NODE_HOST)); } @@ -784,7 +784,7 @@ public void syncTriggers(StringBuilder sqlBuffer, boolean gen_always) { } } } else { - log.info("Failed to synchronize trigger for %s"); + log.info("Failed to synchronize trigger for {}"); } } @@ -802,7 +802,7 @@ protected void inactivateTriggers(List triggersThatShouldBeActive, Set triggerIdsThatShouldBeActive = getTriggerIdsFrom(triggersThatShouldBeActive); for (TriggerHistory history : activeHistories) { if (!triggerIdsThatShouldBeActive.contains(history.getTriggerId())) { - log.info("About to remove triggers for inactivated table: %s", + log.info("About to remove triggers for inactivated table: {}", history.getSourceTableName()); symmetricDialect.removeTrigger(sqlBuffer, history.getSourceCatalogName(), history.getSourceSchemaName(), history.getNameForInsertTrigger(), @@ -833,7 +833,7 @@ protected void inactivateTriggers(List triggersThatShouldBeActive, history.getNameForDeleteTrigger()); if (triggerExists) { log.warn( - "There are triggers that have been marked as inactive. Please remove triggers represented by trigger_id=%s and trigger_hist_id=%s", + "There are triggers that have been marked as inactive. Please remove triggers represented by trigger_id={} and trigger_hist_id={}", history.getTriggerId(), history.getTriggerHistoryId()); } else { inactivateTriggerHistory(history); @@ -936,7 +936,7 @@ protected void updateOrCreateDatabaseTriggers(List triggers, StringBuil } else { log.error( - "The configured table does not exist in the datasource that is configured: %s", + "The configured table does not exist in the datasource that is configured: {}", trigger.qualifiedSourceTableName()); if (this.triggerCreationListeners != null) { @@ -946,7 +946,7 @@ protected void updateOrCreateDatabaseTriggers(List triggers, StringBuil } } } catch (Exception ex) { - log.error("Failed to create triggers for %s", ex, + log.error("Failed to create triggers for {}", ex, trigger.qualifiedSourceTableName()); if (newestHistory != null) { @@ -1049,7 +1049,7 @@ protected TriggerHistory rebuildTriggerIfNecessary(StringBuilder sqlBuffer, hist.getSourceSchemaName(), hist.getSourceTableName(), hist.getTriggerNameForDmlType(dmlType))) { log.warn( - "Cleaning up trigger hist row of %d after failing to create the associated trigger", + "Cleaning up trigger hist row of {} after failing to create the associated trigger", hist.getTriggerHistoryId()); hist.setErrorMessage(ex.getMessage()); inactivateTriggerHistory(hist); @@ -1109,7 +1109,7 @@ protected String getTriggerName(DataEventType dml, int maxTriggerNameLength, Tri if (triggerName.length() > maxTriggerNameLength && maxTriggerNameLength > 0) { triggerName = triggerName.substring(0, maxTriggerNameLength - 1); log.debug( - "We just truncated the trigger name for the %s trigger id=%s. You might want to consider manually providing a name for the trigger that is less than %d characters long", + "We just truncated the trigger name for the {} trigger id={}. You might want to consider manually providing a name for the trigger that is less than {} characters long", new Object[] { dml.name().toLowerCase(), trigger.getTriggerId(), maxTriggerNameLength }); } @@ -1323,4 +1323,4 @@ public TriggerRoutersCache(Map> triggerRoutersByTrig Map routersByRouterId = new HashMap(); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/AbstractTransportManager.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/AbstractTransportManager.java index 5152915ac5..4789618c7c 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/AbstractTransportManager.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/AbstractTransportManager.java @@ -55,7 +55,7 @@ public void addExtensionSyncUrlHandler(String name, ISyncUrlExtension handler) { extensionSyncUrlHandlers = new HashMap(); } if (extensionSyncUrlHandlers.containsKey(name)) { - log.warn("Overriding an existing '%s' extension sync url handler with a second one.", name); + log.warn("Overriding an existing '{}' extension sync url handler with a second one.", name); } extensionSyncUrlHandlers.put(name, handler); } @@ -73,7 +73,7 @@ public String resolveURL(String syncUrl, String registrationUrl) { URI uri = new URI(syncUrl); ISyncUrlExtension handler = extensionSyncUrlHandlers.get(uri.getHost()); if (handler == null) { - log.error("Could not find a registered extension sync url handler with the name of %s using the url %s", uri.getHost(), syncUrl); + log.error("Could not find a registered extension sync url handler with the name of {} using the url {}", uri.getHost(), syncUrl); return syncUrl; } else { return handler.resolveUrl(uri); @@ -203,4 +203,4 @@ private static String getParam(Map parameters, String return (String) value; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/http/HttpBandwidthUrlSelector.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/http/HttpBandwidthUrlSelector.java index 67137aecbe..9c6a531a1f 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/http/HttpBandwidthUrlSelector.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/http/HttpBandwidthUrlSelector.java @@ -106,7 +106,7 @@ protected long getSampleSize(Map params) { try { sampleSize = Long.parseLong(val); } catch (NumberFormatException e) { - log.error("Unable to parse sampleSize of %s", val); + log.error("Unable to parse sampleSize of {}", val); } } return sampleSize; @@ -119,7 +119,7 @@ protected long getMaxSampleDuration(Map params) { try { maxSampleDuration = Long.parseLong(val); } catch (NumberFormatException e) { - log.error("Unable to parse sampleSize of %s",val); + log.error("Unable to parse sampleSize of {}",val); } } return maxSampleDuration; @@ -132,7 +132,7 @@ protected long getSampleTTL(Map params) { try { sampleTTL = Long.parseLong(val); } catch (NumberFormatException e) { - log.error("Unable to parse sampleTTL of %s",val); + log.error("Unable to parse sampleTTL of {}",val); } } return sampleTTL; @@ -220,4 +220,4 @@ public int compare(SyncUrl o1, SyncUrl o2) { } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/http/SelfSignedX509TrustManager.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/http/SelfSignedX509TrustManager.java index 41e24800d4..e63137ea49 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/http/SelfSignedX509TrustManager.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/http/SelfSignedX509TrustManager.java @@ -97,4 +97,4 @@ public void checkServerTrusted(X509Certificate[] certificates,String authType) t public X509Certificate[] getAcceptedIssuers() { return this.standardTrustManager.getAcceptedIssuers(); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/internal/InternalTransportManager.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/internal/InternalTransportManager.java index 78d1ef2a7d..ee24b19793 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/internal/InternalTransportManager.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/transport/internal/InternalTransportManager.java @@ -167,4 +167,4 @@ interface IClientRunnable { public void run(ISymmetricEngine engine, InputStream is, OutputStream os) throws Exception; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/util/AbstractVersion.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/util/AbstractVersion.java index 79db2e3162..99eb069082 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/util/AbstractVersion.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/util/AbstractVersion.java @@ -137,4 +137,4 @@ public boolean isOlderThanVersion(String checkVersion, private boolean noVersion(String targetVersion) { return StringUtils.isBlank(targetVersion); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/util/AppUtils.java b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/util/AppUtils.java index d8e13ea228..a6413e18ed 100644 --- a/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/util/AppUtils.java +++ b/symmetric/symmetric-core/src/main/java/org/jumpmind/symmetric/util/AppUtils.java @@ -149,11 +149,11 @@ public synchronized static void cleanupTempFiles() { FileUtils.forceDelete(it.next()); deletedCount++; } catch (Exception ex) { - log.error("%s", ex.getMessage()); + log.error("{}", ex.getMessage()); } } if (deletedCount > 1) { - log.warn("Cleaned %d stranded temporary files.", deletedCount); + log.warn("Cleaned {} stranded temporary files.", deletedCount); } } catch (Exception ex) { log.error(ex.getMessage(),ex); @@ -185,7 +185,7 @@ public static void sleep(long ms) { try { Thread.sleep(ms); } catch (InterruptedException e) { - log.warn("%s", e.getMessage()); + log.warn("{}", e.getMessage()); } } @@ -218,7 +218,7 @@ public static void runBsh(Map variables, String script) { interpreter.set(variableName, variables.get(variableName)); } } - log.info("%s", "About to run: \n" + script); + log.info("{}", "About to run: \n" + script); interpreter.eval(script); } catch (EvalError e) { throw new RuntimeException(e); @@ -262,4 +262,4 @@ public static boolean isPortAvailable(int port) { } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDatabasePlatform.java b/symmetric/symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDatabasePlatform.java index 5821a0dbdb..019af10fd8 100644 --- a/symmetric/symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDatabasePlatform.java +++ b/symmetric/symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDatabasePlatform.java @@ -356,7 +356,7 @@ public Object[] getObjectValues(BinaryEncoding encoding, String[] values, list.add(objectValue); } } catch (Exception ex) { - log.error("Could not convert a value of %s for column %s of type %s", new Object[] {value, + log.error("Could not convert a value of {} for column {} of type {}", new Object[] {value, column.getName(), column.getType()}); log.error(ex.getMessage(), ex); throw new RuntimeException(ex); diff --git a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/CsvUtils.java b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/CsvUtils.java index b4ee4f8a45..d9e4c489a4 100644 --- a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/CsvUtils.java +++ b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/CsvUtils.java @@ -118,4 +118,4 @@ public static void writeLineFeed(Writer writer) throws IOException { writer.write(LINE_SEPARATOR); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/BshColumnTransform.java b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/BshColumnTransform.java index e2be03d2de..b80a394db9 100644 --- a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/BshColumnTransform.java +++ b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/BshColumnTransform.java @@ -94,7 +94,7 @@ public String transform(IDatabasePlatform platform, } else if (ex instanceof IgnoreRowException) { throw (IgnoreRowException) ex; } else { - log.error("Beanshell script error for target column %s on transform %s", column.getTargetColumnName(), + log.error("Beanshell script error for target column {} on transform {}", column.getTargetColumnName(), column.getTransformId()); throw new TransformColumnException(ex); } diff --git a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/IdentityColumnTransform.java b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/IdentityColumnTransform.java index d83f87c5fe..9ca2d1691e 100644 --- a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/IdentityColumnTransform.java +++ b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/IdentityColumnTransform.java @@ -37,10 +37,10 @@ public String transform(IDatabasePlatform platform, DataContext sourceValues, String newValue, String oldValue) throws IgnoreColumnException, IgnoreRowException { if (log.isDebugEnabled()) { - log.debug("The %s transform requires a generated identity column. This was configured using the %s target column.", data.getTransformation().getTransformId(), column.getTargetColumnName()); + log.debug("The {} transform requires a generated identity column. This was configured using the {} target column.", data.getTransformation().getTransformId(), column.getTargetColumnName()); } data.setGeneratedIdentityNeeded(true); throw new IgnoreColumnException(); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/LookupColumnTransform.java b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/LookupColumnTransform.java index e26e9ab9a2..0b173e2449 100644 --- a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/LookupColumnTransform.java +++ b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/LookupColumnTransform.java @@ -74,14 +74,14 @@ public String transform(IDatabasePlatform platform, lookupValue = values.get(0); } else if (rowCount > 1) { lookupValue = values.get(0); - log.warn("Expected a single row, but returned multiple rows from lookup for target column %s on transform %s ", column.getTargetColumnName(), + log.warn("Expected a single row, but returned multiple rows from lookup for target column {} on transform {} ", column.getTargetColumnName(), column.getTransformId()); } else if (values.size() == 0) { - log.warn("Expected a single row, but returned no rows from lookup for target column %s on transform %s", column.getTargetColumnName(), + log.warn("Expected a single row, but returned no rows from lookup for target column {} on transform {}", column.getTargetColumnName(), column.getTransformId()); } } else { - log.warn("Expected SQL expression for lookup transform, but no expression was found for target column %s on transform %s", column.getTargetColumnName(), + log.warn("Expected SQL expression for lookup transform, but no expression was found for target column {} on transform {}", column.getTargetColumnName(), column.getTransformId()); } return lookupValue; diff --git a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DatabaseWriter.java b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DatabaseWriter.java index 1738da57f2..fe1e135e6f 100644 --- a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DatabaseWriter.java +++ b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DatabaseWriter.java @@ -127,7 +127,7 @@ public boolean start(Table table) { if (this.targetTable != null || hasFilterThatHandlesMissingTable(table)) { return true; } else { - log.warn("Did not find the %s table in the target database", + log.warn("Did not find the {} table in the target database", sourceTable.getFullyQualifiedTableName()); return false; } @@ -415,7 +415,7 @@ protected boolean script(CsvData data) { } } - log.info("About to run: %s", script); + log.info("About to run: {}", script); interpreter.eval(script); statistics.get(batch).increment(DatabaseWriterStatistics.SCRIPTCOUNT); } catch (EvalError e) { @@ -448,9 +448,9 @@ protected boolean sql(CsvData data) { statistics.get(batch).startTimer(DatabaseWriterStatistics.DATABASEMILLIS); String sql = data.getCsvData(CsvData.ROW_DATA); transaction.prepare(sql); - log.info("About to run: %s", sql); + log.info("About to run: {}", sql); long count = transaction.execute(sql); - log.info("%d rows updated when running: %s", count, sql); + log.info("{} rows updated when running: {}", count, sql); statistics.get(batch).increment(DatabaseWriterStatistics.SQLCOUNT); statistics.get(batch).increment(DatabaseWriterStatistics.SQLROWSAFFECTEDCOUNT, count); return true; diff --git a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DefaultTransformWriterConflictResolver.java b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DefaultTransformWriterConflictResolver.java index 820664c5d9..e23e8c6e95 100644 --- a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DefaultTransformWriterConflictResolver.java +++ b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DefaultTransformWriterConflictResolver.java @@ -30,7 +30,7 @@ protected void performFallbackToInsert(DatabaseWriter writer, CsvData data) { CsvData newData = newlyTransformedData.buildTargetCsvData(); if (newlyTransformedData.isGeneratedIdentityNeeded()) { if (log.isDebugEnabled()) { - log.debug("Enabling generation of identity for %s", + log.debug("Enabling generation of identity for {}", newlyTransformedData.getTableName()); } writer.getTransaction().allowInsertIntoAutoIncrementColumns(false, table); diff --git a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/TransformWriter.java b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/TransformWriter.java index 9a14c53299..9a55a7adc7 100644 --- a/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/TransformWriter.java +++ b/symmetric/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/TransformWriter.java @@ -141,7 +141,7 @@ public void write(CsvData data) { if (log.isDebugEnabled()) { log.debug( - "%d transformation(s) started because of %s on %s. The original row data was: %s", + "{} transformation(s) started because of {} on {}. The original row data was: {}", new Object[] { activeTransforms.size(), eventType.toString(), this.sourceTable.getFullyQualifiedTableName(), sourceValues }); } @@ -176,7 +176,7 @@ protected List transform(DataEventType eventType, dataToTransform.size()); if (log.isDebugEnabled()) { log.debug( - "%d target data was created for the %s transformation. The target table is %s", + "{} target data was created for the {} transformation. The target table is {}", new Object[] { dataToTransform.size(), transformation.getTransformId(), transformation.getFullyQualifiedTargetTableName() }); } @@ -186,7 +186,7 @@ protected List transform(DataEventType eventType, if (perform(context, targetData, transformation, sourceValues, oldSourceValues)) { if (log.isDebugEnabled()) { log.debug( - "Data has been transformed to a %s for the #%d transform. The mapped target columns are: %s. The mapped target values are: %s", + "Data has been transformed to a {} for the #{} transform. The mapped target columns are: {}. The mapped target values are: {}", new Object[] { targetData.getTargetDmlType().toString(), transformNumber, ArrayUtils.toString(targetData.getColumnNames()), @@ -194,7 +194,7 @@ protected List transform(DataEventType eventType, } dataThatHasBeenTransformed.add(targetData); } else { - log.debug("Data has not been transformed for the #%d transform", + log.debug("Data has not been transformed for the #{} transform", transformNumber); } } @@ -203,7 +203,7 @@ protected List transform(DataEventType eventType, // ignore this row if (log.isDebugEnabled()) { log.debug( - "Transform indicated that the target row should be ignored with a target key of: %s", + "Transform indicated that the target row should be ignored with a target key of: {}", "unknown. Transformation aborted during tranformation of key"); } return new ArrayList(0); @@ -231,7 +231,7 @@ protected boolean perform(DataContext create( oldSourceValues, sourceValues)); List columns = transformation.getPrimaryKeyColumns(); if (columns == null || columns.size() == 0) { - log.error("No primary key defined for the transformation: %s", + log.error("No primary key defined for the transformation: {}", transformation.getTransformId()); } else { for (TransformColumn transformColumn : columns) { diff --git a/symmetric/symmetric-jdbc/src/main/java/org/jumpmind/db/sql/jdbc/JdbcSqlTemplate.java b/symmetric/symmetric-jdbc/src/main/java/org/jumpmind/db/sql/jdbc/JdbcSqlTemplate.java index cf179dcd59..344c577735 100644 --- a/symmetric/symmetric-jdbc/src/main/java/org/jumpmind/db/sql/jdbc/JdbcSqlTemplate.java +++ b/symmetric/symmetric-jdbc/src/main/java/org/jumpmind/db/sql/jdbc/JdbcSqlTemplate.java @@ -264,10 +264,10 @@ public Integer execute(Connection con) throws SQLException { } catch (SQLException ex) { if (!failOnError) { if (statement.toLowerCase().startsWith("drop")) { - log.debug("%s. Failed to execute: %s.", ex.getMessage(), + log.debug("{}. Failed to execute: {}.", ex.getMessage(), statement); } else { - log.warn("%s. Failed to execute: %s.", ex.getMessage(), + log.warn("{}. Failed to execute: {}.", ex.getMessage(), statement); } } else { diff --git a/symmetric/symmetric-jdbc/src/main/java/org/jumpmind/db/sql/jdbc/JdbcSqlTransaction.java b/symmetric/symmetric-jdbc/src/main/java/org/jumpmind/db/sql/jdbc/JdbcSqlTransaction.java index 4b32f5f35a..ba05752fc8 100644 --- a/symmetric/symmetric-jdbc/src/main/java/org/jumpmind/db/sql/jdbc/JdbcSqlTransaction.java +++ b/symmetric/symmetric-jdbc/src/main/java/org/jumpmind/db/sql/jdbc/JdbcSqlTransaction.java @@ -239,7 +239,7 @@ public void prepare(String sql) { } JdbcSqlTemplate.close(pstmt); if (log.isDebugEnabled()) { - log.debug("Preparing: %s", sql); + log.debug("Preparing: {}", sql); } pstmt = connection.prepareStatement(sql); psql = sql; @@ -252,7 +252,7 @@ public int addRow(Object marker, Object[] args, int[] argTypes) { int rowsUpdated = 0; try { if (log.isDebugEnabled()) { - log.debug("Adding %s %s", ArrayUtils.toString(args), inBatchMode ? " in batch mode" + log.debug("Adding {} {}", ArrayUtils.toString(args), inBatchMode ? " in batch mode" : ""); } if (args != null) { diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricLauncher.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricLauncher.java index 955494c064..69788f5ea1 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricLauncher.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricLauncher.java @@ -163,7 +163,7 @@ public void execute(String... args) throws Exception { if (line.getOptions() != null) { for (Option option : line.getOptions()) { - log.info("Option: name=%s, value=%s", new Object[] { option.getLongOpt(), + log.info("Option: name={}, value={}", new Object[] { option.getLongOpt(), ArrayUtils.toString(option.getValues()) }); } } @@ -666,4 +666,4 @@ private void runSql(ISymmetricEngine engine, String fileName) throws FileNotFoun } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricWebServer.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricWebServer.java index 451cd19261..04ddca20b1 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricWebServer.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricWebServer.java @@ -272,7 +272,7 @@ protected Connector[] getConnectors(int port, int securePort, Mode mode) { connector.setHost(host); connector.setMaxIdleTime(maxIdleTime); connectors.add(connector); - log.info("About to start %s web server on port %d", name, port); + log.info("About to start {} web server on port {}", name, port); } if (mode.equals(Mode.HTTPS) || mode.equals(Mode.MIXED)) { Connector connector = new SslSocketConnector(); @@ -290,14 +290,14 @@ protected Connector[] getConnectors(int port, int securePort, Mode mode) { connector.setPort(securePort); connector.setHost(host); connectors.add(connector); - log.info("About to start SymmetricDS web server on secure port %d", securePort); + log.info("About to start SymmetricDS web server on secure port {}", securePort); } return connectors.toArray(new Connector[connectors.size()]); } protected void registerHttpJmxAdaptor(int jmxPort) throws Exception { if (AppUtils.isSystemPropertySet(SystemConstants.JMX_HTTP_CONSOLE_ENABLED, true)) { - log.info("Starting JMX HTTP console on port %d", jmxPort); + log.info("Starting JMX HTTP console on port {}", jmxPort); MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer(); ObjectName name = getHttpJmxAdaptorName(); mbeanServer.createMBean(HttpAdaptor.class.getName(), name); @@ -421,4 +421,4 @@ public void setName(String name) { public String getName() { return name; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/AbstractTextPublisherDataLoaderFilter.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/AbstractTextPublisherDataLoaderFilter.java index 29c47eff45..cb04711b1a 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/AbstractTextPublisherDataLoaderFilter.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/AbstractTextPublisherDataLoaderFilter.java @@ -109,7 +109,7 @@ private void finalizeAndPublish( StringBuilder msg = getFromCache(context); if (msg.length() > 0) { msg.append(addTextFooter(context)); - log.debug("Publishing text message %s", msg); + log.debug("Publishing text message {}", msg); context.remove(MSG_CACHE); publisher.publish(context, msg.toString()); } @@ -127,7 +127,7 @@ protected void logCount() { messagesSinceLastLogOutput++; long timeInMsSinceLastLogOutput = System.currentTimeMillis() - lastTimeInMsOutputLogged; if (timeInMsSinceLastLogOutput > minTimeInMsBetweenLogOutput) { - log.info("%s published %d messages in the last %d ms.", new Object[] { beanName, + log.info("{} published {} messages in the last {} ms.", new Object[] { beanName, messagesSinceLastLogOutput, timeInMsSinceLastLogOutput }); lastTimeInMsOutputLogged = System.currentTimeMillis(); messagesSinceLastLogOutput = 0; @@ -162,4 +162,4 @@ public void setTableName(String tableName) { this.tableName = tableName; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/AbstractXmlPublisherExtensionPoint.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/AbstractXmlPublisherExtensionPoint.java index 5e1ceeccad..1c66eab7aa 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/AbstractXmlPublisherExtensionPoint.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/AbstractXmlPublisherExtensionPoint.java @@ -105,7 +105,7 @@ protected void finalizeXmlAndPublish(Context context) { Collection buffers = contextCache.values(); for (Iterator iterator = buffers.iterator(); iterator.hasNext();) { String xml = new XMLOutputter(xmlFormat).outputString(new Document(iterator.next())); - log.debug("Sending XML to IPublisher: %s", xml); + log.debug("Sending XML to IPublisher: {}", xml); iterator.remove(); publisher.publish(context, xml.toString()); } @@ -279,4 +279,4 @@ public interface ITimeGenerator { public String getTime(); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/SimpleJmsPublisher.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/SimpleJmsPublisher.java index ff0cb8889c..a52bec0895 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/SimpleJmsPublisher.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/SimpleJmsPublisher.java @@ -40,7 +40,7 @@ public class SimpleJmsPublisher implements IPublisher, BeanFactoryAware { public boolean enabled = true; public void publish(Context context, String text) { - log.debug("Publishing %s", text); + log.debug("Publishing {}", text); JmsTemplate jmsTemplate = (JmsTemplate) beanFactory.getBean(jmsTemplateBeanName); if (enabled) { jmsTemplate.convertAndSend(text); @@ -60,4 +60,4 @@ public void setJmsTemplateBeanName(String jmsTemplateBeanName) { public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/XmlPublisherDataLoaderFilter.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/XmlPublisherDataLoaderFilter.java index 009a04f48c..e12620f711 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/XmlPublisherDataLoaderFilter.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/XmlPublisherDataLoaderFilter.java @@ -80,7 +80,7 @@ public boolean beforeWrite( data.getParsedData(CsvData.PK_DATA)); } } else if (log.isDebugEnabled()) { - log.debug("'%s' not in list to publish", table.getName()); + log.debug("'{}' not in list to publish", table.getName()); } return loadDataInTargetDatabase; } @@ -117,4 +117,4 @@ public void batchRolledback( DataContext context) { } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/XmlPublisherDataRouter.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/XmlPublisherDataRouter.java index 307976d3ca..94e3768141 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/XmlPublisherDataRouter.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/integrate/XmlPublisherDataRouter.java @@ -68,7 +68,7 @@ public Set routeToNodes(SimpleRouterContext context, DataMetaData dataMe .getParsedPkColumnNames(), dataMetaData.getData().toParsedPkData()); } } else if (log.isDebugEnabled()) { - log.debug("'%s' not in list to publish", dataMetaData.getData().getTableName()); + log.debug("'{}' not in list to publish", dataMetaData.getData().getTableName()); } return Collections.emptySet(); } @@ -85,4 +85,4 @@ public void setOnePerBatch(boolean onePerBatch) { this.onePerBatch = onePerBatch; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/map/ColumnDataFilters.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/map/ColumnDataFilters.java index 906421d330..3d7bafdfbd 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/map/ColumnDataFilters.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/map/ColumnDataFilters.java @@ -91,7 +91,7 @@ protected void filterColumnValues(Context context, Table table, CsvData data) { do { causedBy = ExceptionUtils.getCause(causedBy); if (causedBy instanceof ScriptCompilationException) { - log.error("%s", causedBy.getMessage()); + log.error("{}", causedBy.getMessage()); throw new RuntimeException(causedBy.getMessage()); } } while (causedBy != null); @@ -100,7 +100,7 @@ protected void filterColumnValues(Context context, Table table, CsvData data) { } } } catch (RuntimeException ex) { - log.error("Failed to transform value for column %s on table %s", filteredColumn.getColumnName(), + log.error("Failed to transform value for column {} on table {}", filteredColumn.getColumnName(), filteredColumn.getTableName()); throw ex; } @@ -140,4 +140,4 @@ public void setEnabled(boolean enabled) { this.enabled = enabled; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/AbstractCompressionUriHandler.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/AbstractCompressionUriHandler.java index 8a60cedc8e..87cef95ee7 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/AbstractCompressionUriHandler.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/AbstractCompressionUriHandler.java @@ -30,7 +30,7 @@ final public void handle(HttpServletRequest req, HttpServletResponse res) throws log.debug("@doFilter"); boolean supportCompression = false; - log.debug("requestURI= %s", req.getRequestURI()); + log.debug("requestURI= {}", req.getRequestURI()); // Are we allowed to compress ? String s = (String) req.getParameter("gzip"); diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/AckUriHandler.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/AckUriHandler.java index c6bfa4fc2e..4aec241f93 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/AckUriHandler.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/AckUriHandler.java @@ -55,7 +55,7 @@ public AckUriHandler( public void handle(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { if (log.isDebugEnabled()) { - log.debug("Reading ack: %s", req.getParameterMap()); + log.debug("Reading ack: {}", req.getParameterMap()); } @SuppressWarnings("unchecked") List batches = AbstractTransportManager.readAcknowledgement(req diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/BandwidthSamplerUriHandler.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/BandwidthSamplerUriHandler.java index 6e0614f9c4..898bac9a97 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/BandwidthSamplerUriHandler.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/BandwidthSamplerUriHandler.java @@ -56,7 +56,7 @@ public void handle(HttpServletRequest req, HttpServletResponse res) throws IOExc try { sampleSize = Long.parseLong(req.getParameter("sampleSize")); } catch (Exception ex) { - log.warn("Unable to parse sampleSize of %s", req.getParameter("sampleSize")); + log.warn("Unable to parse sampleSize of {}", req.getParameter("sampleSize")); } ServletOutputStream os = res.getOutputStream(); @@ -72,4 +72,4 @@ public void setDefaultTestSlowBandwidthDelay(long defaultTestSlowBandwidthDelay) this.defaultTestSlowBandwidthDelay = defaultTestSlowBandwidthDelay; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/PullUriHandler.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/PullUriHandler.java index cdb287eb49..5fb09f93c4 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/PullUriHandler.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/PullUriHandler.java @@ -70,7 +70,7 @@ public void handleWithCompression(HttpServletRequest req, HttpServletResponse re // request has the "other" nodes info String nodeId = ServletUtils.getParameter(req, WebConstants.NODE_ID); - log.debug("Pull request received from %s", nodeId); + log.debug("Pull request received from {}", nodeId); if (StringUtils.isBlank(nodeId)) { ServletUtils.sendError(res, HttpServletResponse.SC_BAD_REQUEST, "Node must be specified"); @@ -85,7 +85,7 @@ public void handleWithCompression(HttpServletRequest req, HttpServletResponse re pull(nodeId, req.getRemoteHost(), req.getRemoteAddr(), res.getOutputStream(), map); - log.debug("Done with Pull request from %s", nodeId); + log.debug("Done with Pull request from {}", nodeId); } @@ -112,7 +112,7 @@ public void pull(String nodeId, String remoteHost, String remoteAddress, outgoingTransport.close(); } } else { - log.warn("Node %s does not exist.", nodeId); + log.warn("Node {} does not exist.", nodeId); } } finally { statisticManager.incrementNodesPulled(1); @@ -147,4 +147,4 @@ public void setDataExtractorService(IDataExtractorService dataExtractorService) public void setStatisticManager(IStatisticManager statisticManager) { this.statisticManager = statisticManager; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/PushUriHandler.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/PushUriHandler.java index 862a36fa57..9a331a2318 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/PushUriHandler.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/PushUriHandler.java @@ -54,7 +54,7 @@ public void handle(HttpServletRequest req, HttpServletResponse res) throws IOExc ServletException { String nodeId = ServletUtils.getParameter(req, WebConstants.NODE_ID); - log.debug("Push requested for %s", nodeId); + log.debug("Push requested for {}", nodeId); InputStream inputStream = createInputStream(req); OutputStream outputStream = res.getOutputStream(); @@ -63,7 +63,7 @@ public void handle(HttpServletRequest req, HttpServletResponse res) throws IOExc // Not sure if this is necessary, but it's been here and it hasn't hurt // anything ... res.flushBuffer(); - log.debug("Push completed for %s", nodeId); + log.debug("Push completed for {}", nodeId); } @@ -88,4 +88,4 @@ protected InputStream createInputStream(HttpServletRequest req) throws IOExcepti return is; } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/RegistrationUriHandler.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/RegistrationUriHandler.java index 6824c31f0d..92dc99171a 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/RegistrationUriHandler.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/RegistrationUriHandler.java @@ -55,7 +55,7 @@ public void handle(HttpServletRequest req, HttpServletResponse res) throws IOExc try { OutputStream outputStream = res.getOutputStream(); if (!registerNode(node, req.getRemoteHost(), req.getRemoteAddr(), outputStream)) { - log.warn("%s was not allowed to register.", node); + log.warn("{} was not allowed to register.", node); ServletUtils.sendError(res, WebConstants.REGISTRATION_NOT_OPEN, String.format("%s was not allowed to register.", node)); } @@ -83,4 +83,4 @@ protected boolean registerNode(Node node, String remoteHost, String remoteAddres return registrationService.registerNode(node, remoteHost, remoteAddress, outputStream, true); } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/SymmetricEngineHolder.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/SymmetricEngineHolder.java index 7ecd72b414..b14900fc43 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/SymmetricEngineHolder.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/SymmetricEngineHolder.java @@ -108,7 +108,7 @@ protected ISymmetricEngine create(String propertiesFile) { if (!engines.containsKey(engine.getEngineName())) { engines.put(engine.getEngineName(), engine); } else { - log.error("An engine with the name of %s was not started because an engine of the same name has already been started. Please set the engine.name property in the properties file to a unique name.", engine.getEngineName()); + log.error("An engine with the name of {} was not started because an engine of the same name has already been started. Please set the engine.name property in the properties file to a unique name.", engine.getEngineName()); } } return engine; diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/SymmetricServlet.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/SymmetricServlet.java index e369cd2587..ba53ddfb89 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/SymmetricServlet.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/SymmetricServlet.java @@ -94,7 +94,7 @@ protected void service(HttpServletRequest req, HttpServletResponse res) } } else { log.error( - "No handlers were found to handle the request %s from the host %s with an ip address of %s. The query string was: %s", + "No handlers were found to handle the request {} from the host {} with an ip address of {}. The query string was: {}", new Object[] { ServletUtils.normalizeRequestUri(req), req.getRemoteHost(), req.getRemoteAddr(), req.getQueryString() }); if (method.equals(WebConstants.METHOD_GET)) { @@ -193,15 +193,15 @@ protected void logException(HttpServletRequest req, Exception ex, boolean isErro : ""; if (isError) { log.error( - "Error while processing %s request for externalId: %s, node: %s at %s (%s) with path: %s", + "Error while processing {} request for externalId: {}, node: {} at {} ({}) with path: {}", new Object[] { method, externalId, nodeId, address, hostName, ServletUtils.normalizeRequestUri(req) }); log.error(ex.getMessage(), ex); } else { log.warn( - "Error while processing %s request for externalId: %s, node: %s at %s (%s). The message is: %s", + "Error while processing {} request for externalId: {}, node: {} at {} ({}). The message is: {}", new Object[] { method, externalId, nodeId, address, hostName, ex.getMessage() }); } } -} \ No newline at end of file +} diff --git a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/compression/CompressionServletResponseWrapper.java b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/compression/CompressionServletResponseWrapper.java index 33fcb82f81..899acf7e5f 100644 --- a/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/compression/CompressionServletResponseWrapper.java +++ b/symmetric/symmetric-server/src/main/java/org/jumpmind/symmetric/web/compression/CompressionServletResponseWrapper.java @@ -103,7 +103,7 @@ public CompressionServletResponseWrapper(HttpServletResponse response, int compr * Set content type */ public void setContentType(String contentType) { - log.debug("setContentType to %s", contentType); + log.debug("setContentType to {}", contentType); this.contentType = contentType; origResponse.setContentType(contentType); } @@ -167,7 +167,7 @@ public ServletOutputStream getOutputStream() throws IOException { if (stream == null) stream = createOutputStream(); - log.debug("stream is set to %s in getOutputStream", stream); + log.debug("stream is set to {} in getOutputStream", stream); return (stream); } @@ -189,10 +189,10 @@ public PrintWriter getWriter() throws IOException { throw new IllegalStateException("getOutputStream() has already been called for this response"); stream = createOutputStream(); - log.debug("stream is set to %s in getWriter", stream); + log.debug("stream is set to {} in getWriter", stream); // String charset = getCharsetFromContentType(contentType); String charEnc = origResponse.getCharacterEncoding(); - log.debug("character encoding is %s", charEnc); + log.debug("character encoding is {}", charEnc); // HttpServletResponse.getCharacterEncoding() shouldn't return null // according the spec, so feel free to remove that "if" if (charEnc != null) { @@ -208,4 +208,4 @@ public PrintWriter getWriter() throws IOException { public void setContentLength(int length) { } -} \ No newline at end of file +}