Improve log texts 46/104246/2
authorLasse Kaihlavirta <l.kaihlavirt@partner.samsung.com>
Tue, 24 Mar 2020 13:43:15 +0000 (15:43 +0200)
committerOfir Sonsino <ofir.sonsino@intl.att.com>
Tue, 24 Mar 2020 17:25:11 +0000 (17:25 +0000)
Issue-ID: SDC-2852
Signed-off-by: Lasse Kaihlavirta <l.kaihlavirt@partner.samsung.com>
Change-Id: I7a1ebfc625e297f943794046f37b15cc48d8cacb

asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/RestUtils.java
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/ArtifactCassandraDao.java
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/AuditCassandraDao.java
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/OperationalEnvironmentDao.java
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/SdcSchemaFilesCassandraDao.java
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/SdcSchemaBuilder.java

index 6a35da1..27ef49a 100644 (file)
@@ -48,7 +48,7 @@ public class RestUtils {
                    HttpResponse<String> httpResponse = HttpRequest.delete(url, headers);
             int status = httpResponse.getStatusCode();
             if (status == HttpStatus.SC_OK) {
-                log.debug("Product uid:{} succsesfully deleted", productUid);
+                log.debug("Product uid:{} successfully deleted", productUid);
             }
             else {
                 log.error("Product uid:{} delete failed status {}", productUid, status);
index 3b1fca4..c5b48d9 100644 (file)
@@ -95,7 +95,7 @@ public class ArtifactCassandraDao extends CassandraDao {
                        logger.debug("Failed to clean artifacts", e);
                        return CassandraOperationStatus.GENERAL_ERROR;
                }
-               logger.info("cleaning all artifacts finished succsesfully.");
+               logger.info("cleaning all artifacts finished successfully.");
                return CassandraOperationStatus.OK;
        }
 
index 7c27fc9..fe0022d 100644 (file)
@@ -382,14 +382,14 @@ public class AuditCassandraDao extends CassandraDao {
                                if (table.getTableDescription().getKeyspace().equals(AuditingTypesConstants.AUDIT_KEYSPACE)) {
                                        logger.debug("clean Audit table:{}", table.getTableDescription().getTableName());
                                        session.execute(query + table.getTableDescription().getTableName() + ";");
-                                       logger.debug("clean Audit table:{} was succsesfull", table.getTableDescription().getTableName());
+                                       logger.debug("clean Audit table:{} was successful", table.getTableDescription().getTableName());
                                }
                        }
                } catch (Exception e) {
                        logger.error("Failed to clean Audit", e);
                        return CassandraOperationStatus.GENERAL_ERROR;
                }
-               logger.info("clean all audit finished succsesfully.");
+               logger.info("cleaning all audit tables finished successfully.");
                return CassandraOperationStatus.OK;
        }
 }
index e009ea6..30eb035 100644 (file)
@@ -85,10 +85,10 @@ public class OperationalEnvironmentDao extends CassandraDao {
         try {
             session.execute(query);
         } catch (Exception e) {
-            logger.debug("Failed to clean operational environment", e);
+            logger.debug("Failed to clean operational environments", e);
             return CassandraOperationStatus.GENERAL_ERROR;
         }
-        logger.info("cleaning all operational environment finished succsesfully.");
+        logger.info("cleaning all operational environments finished successfully.");
         return CassandraOperationStatus.OK;
     }
 
index b2d9b5c..9ca10c9 100644 (file)
@@ -119,7 +119,7 @@ public class SdcSchemaFilesCassandraDao extends CassandraDao {
                        logger.debug("Failed to clean artifacts", e);
                        return CassandraOperationStatus.GENERAL_ERROR;
                }
-               logger.info("cleaning all artifacts finished succsesfully.");
+               logger.info("cleaning all artifacts finished successfully.");
                return CassandraOperationStatus.OK;
        }
 
index 8c09e55..c5e578c 100644 (file)
@@ -213,12 +213,12 @@ public class SdcSchemaBuilder {
 
                                log.trace("exacuting :{}", create);
                                session.execute(create);
-                               log.info("table:{} created succsesfully.", tableName);
+                               log.info("table:{} created successfully.", tableName);
                        } else {
-                               log.info("table:{} already exists skiping.", tableName);
+                               log.info("table:{} already exists, skipping.", tableName);
                                alterTable(session, existingTablesMetadata, tableDescription, tableName, columnDescription);
                        }
-                       log.info("keyspacemetdata{}",keyspaceMetadate);
+                       log.info("keyspacemetadata:{}",keyspaceMetadate);
                        List<String> indexNames = (keyspaceMetadate != null && keyspaceMetadate.get(tableName) != null ? keyspaceMetadate.get(tableName) : new ArrayList<>());
                        log.info("table:{} creating indexes.", tableName);
                        for (Map.Entry<String, ImmutablePair<DataType, Boolean>> description : columnDescription.entrySet()) {
@@ -229,9 +229,9 @@ public class SdcSchemaBuilder {
                                                                .onTable(tableDescription.getKeyspace(), tableName).andColumn(description.getKey());
                                                log.info("executing :{}", creatIndex);
                                                session.execute(creatIndex);
-                                               log.info("index:{} created succsesfully.", indexName);
+                                               log.info("index:{} created successfully.", indexName);
                                        } else {
-                                               log.info("index:{} already exists skiping.", indexName);
+                                               log.info("index:{} already exists, skipping.", indexName);
                                        }
                                }
                        }
@@ -259,7 +259,7 @@ public class SdcSchemaBuilder {
                                log.info("Adding new column {} to the table {}", columnName,tableName);
                                Alter alter = SchemaBuilder.alterTable(tableDescription.getKeyspace(),tableDescription.getTableName());
                                SchemaStatement addColumn = alter.addColumn(columnName).type(column.getValue().getLeft());
-                               log.trace("exacuting :{}", addColumn);
+                               log.trace("executing :{}", addColumn);
                                session.execute(addColumn);
                        }
                }
@@ -280,7 +280,7 @@ public class SdcSchemaBuilder {
                if (!cassndraMetadata.keySet().contains(keyspace)) {
                        return createKeyspaceIfNotExists(keyspace, session, keyspaceConfigList);
                }
-               log.info("keyspace:{} already exists skipping.", keyspace);
+               log.info("keyspace:{} already exists, skipping.", keyspace);
                return true;
        }
 
@@ -289,14 +289,14 @@ public class SdcSchemaBuilder {
                if (keyspaceConfig.isPresent()) {
                        return createKeyspaceWhenConfigExists(keyspace, session, keyspaceConfig.get());
                }
-               log.info("keyspace:{} not present in configuration, no info on replications is available. operation failed.", keyspace);
+               log.info("keyspace:{} not present in configuration, no info on replications is available. Operation failed.", keyspace);
                return false;
        }
 
        private static boolean createKeyspaceWhenConfigExists(String keyspace, Session session, Configuration.CassandrConfig.KeyspaceConfig keyspaceConfig) {
                String createKeyspaceQuery = createKeyspaceQuereyString(keyspace, keyspaceConfig);
                if (createKeyspaceQuery != null) {
-                       log.trace("exacuting: {}", createKeyspaceQuery);
+                       log.trace("executing: {}", createKeyspaceQuery);
                        session.execute(createKeyspaceQuery);
                        log.info("keyspace:{} created.", keyspace);
                        return true;
@@ -346,7 +346,7 @@ public class SdcSchemaBuilder {
                } else if (ReplicationStrategy.SIMPLE_STRATEGY.getStrategyName().equalsIgnoreCase(keyspaceInfo.getReplicationStrategy())) {
                        query = createSimpleStrategyQuery(keyspaceInfo, keyspace);
                } else {
-                       log.error("the suplied replication Strategy  is in valide expacted {}/{} etc recived:{}",
+                       log.error("the supplied replication Strategy is invalid; expected {}/{}, received:{}",
                                        ReplicationStrategy.NETWORK_TOPOLOGY_STRATEGY.getStrategyName(),
                                        ReplicationStrategy.SIMPLE_STRATEGY.getStrategyName(), keyspaceInfo.getReplicationStrategy());
                }
@@ -357,7 +357,7 @@ public class SdcSchemaBuilder {
                String query = null;
                List<String> dcList = keyspaceInfo.getReplicationInfo();
                if (dcList.size() % 2 != 0) {
-                       log.error("the supplied replication info is in valid expected dc1,2,dc2,2 etc received:{}", dcList);
+                       log.error("the supplied replication info is invalid; expected dc1,2,dc2,2 etc, received:{}", dcList);
 
                } else {
                        StringBuilder sb = new StringBuilder();
@@ -376,7 +376,7 @@ public class SdcSchemaBuilder {
                String query = null;
                List<String> dcList = keyspaceInfo.getReplicationInfo();
                if (dcList.size() != 1) {
-                       log.error("the supplied replication info is in valid expected <number> etc received:{}", dcList);
+                       log.error("the supplied replication info is invalid; expected <number>, received:{}", dcList);
 
                } else {
                        query = String.format(CREATE_KEYSPACE_SIMPLE_STRATEGY, keyspace, "'replication_factor'" + " : " + dcList.get(0));