Optimize Build
Optimize the log output
Issue-ID: SDC-3232
Signed-off-by: JulienBe <julien.bertozzi@intl.att.com>
Change-Id: I50cfb7119b1e9087d3e2db56a81fe47df4ad6254
diff --git a/integration-tests/src/test/resources/ci/conf/log4j2.properties b/integration-tests/src/test/resources/ci/conf/log4j2.properties
deleted file mode 100644
index a8944db..0000000
--- a/integration-tests/src/test/resources/ci/conf/log4j2.properties
+++ /dev/null
@@ -1,46 +0,0 @@
-status = error
-dest = err
-name = PropertiesConfig
-
-property.filename = ${targetlog}logs/ci-log.out
-
-#filter.threshold.type = ThresholdFilter
-#filter.threshold.level = debug
-
-appender.rolling.type = RollingFile
-appender.rolling.name = RollingFile
-appender.rolling.fileName = ${filename}
-appender.rolling.filePattern = ${targetlog}logs/ci-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz
-appender.rolling.layout.type = PatternLayout
-appender.rolling.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %5p [%10c] : %m%n
-appender.rolling.policies.type = Policies
-appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
-appender.rolling.policies.size.size=5MB
-appender.rolling.strategy.type = DefaultRolloverStrategy
-appender.rolling.strategy.max = 10
-
-appender.console.type = Console
-appender.console.name = STDOUT
-appender.console.layout.type = PatternLayout
-appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %5p %10c:%L - %m%n
-appender.console.filter.threshold.type = ThresholdFilter
-appender.console.filter.threshold.level = info
-
-logger.rolling.name = RollingAppender
-logger.rolling.level = info
-logger.rolling.additivity = false
-logger.rolling.appenderRef.rolling.ref = RollingFile
-
-logger.org.apache.cassandra.service.StorageProxy.level=info
-logger.org.janusgraph.diskstorage.cassandra.CassandraTransaction.level =info
-logger.org.janusgraph.diskstorage.cassandra.CassandraTransaction.appendRef.rolling.ref = RollingFile
-logger.org.janusgraph.diskstorage.cassandra.CassandraTransaction.appendRef.stdout.ref = STDOUT
-
-logger.org.openecomp.sdc.ci.tests.utils.level = info
-logger.org.openecomp.sdc.ci.tests.utils.appendRef.rolling.ref = RollingFile
-logger.org.openecomp.sdc.ci.tests.utils.appendRef.stdout.ref = STDOUT
-logger.org.openecomp.sdc.ci.tests.utils.additivity = false
-
-rootLogger.level = info
-rootLogger.appenderRef.stdout.ref = STDOUT
-rootLogger.appenderRef.rolling.ref = RollingFile
diff --git a/integration-tests/src/test/resources/ci/conf/log4j2.xml b/integration-tests/src/test/resources/ci/conf/log4j2.xml
deleted file mode 100644
index 5295d45..0000000
--- a/integration-tests/src/test/resources/ci/conf/log4j2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="ERROR">
- <Appenders>
- <File name="fileAppender" fileName="logfile.log" append="false">
- <PatternLayout pattern="%d %-5p [%c{1}] %m %n"/>
- </File>
- </Appenders>
- <Loggers>
- <Root level="info">
- <AppenderRef ref="fileAppender"/>
- </Root>
- </Loggers>
-</Configuration>
\ No newline at end of file
diff --git a/integration-tests/src/test/resources/ci/testSuites/backend/CRUDArtifacts.xml b/integration-tests/src/test/resources/ci/testSuites/backend/CRUDArtifacts.xml
index 0306e46..2dedb4e 100644
--- a/integration-tests/src/test/resources/ci/testSuites/backend/CRUDArtifacts.xml
+++ b/integration-tests/src/test/resources/ci/testSuites/backend/CRUDArtifacts.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="CRUDArtifacts" configfailurepolicy="continue" verbose="2" parallel="tests" thread-count="10">
+<suite name="CRUDArtifacts" configfailurepolicy="continue" parallel="tests" thread-count="10">
<test name="Test">
<classes>
diff --git a/integration-tests/src/test/resources/ci/testSuites/backend/ExternalApiSanity.xml b/integration-tests/src/test/resources/ci/testSuites/backend/ExternalApiSanity.xml
index b17a8e6..8b86c7a 100644
--- a/integration-tests/src/test/resources/ci/testSuites/backend/ExternalApiSanity.xml
+++ b/integration-tests/src/test/resources/ci/testSuites/backend/ExternalApiSanity.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="CRUDArtifacts" configfailurepolicy="continue" verbose="2" parallel="methods" thread-count="2" data-provider-thread-count="2">
+<suite name="CRUDArtifacts" configfailurepolicy="continue" parallel="methods" thread-count="2" data-provider-thread-count="2">
<test name="Test">
<classes>
diff --git a/integration-tests/src/test/resources/ci/testSuites/backend/SearchExternalAPI.xml b/integration-tests/src/test/resources/ci/testSuites/backend/SearchExternalAPI.xml
index b401c28..b65db48 100644
--- a/integration-tests/src/test/resources/ci/testSuites/backend/SearchExternalAPI.xml
+++ b/integration-tests/src/test/resources/ci/testSuites/backend/SearchExternalAPI.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="CRUDArtifacts" configfailurepolicy="continue" verbose="2" parallel="tests" thread-count="10">
+<suite name="CRUDArtifacts" configfailurepolicy="continue" parallel="tests" thread-count="10">
<test name="Test">
<classes>
diff --git a/integration-tests/src/test/resources/ci/testSuites/backend/ciFull.xml b/integration-tests/src/test/resources/ci/testSuites/backend/ciFull.xml
index 963c568..18be6fa 100644
--- a/integration-tests/src/test/resources/ci/testSuites/backend/ciFull.xml
+++ b/integration-tests/src/test/resources/ci/testSuites/backend/ciFull.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="ciFull" configfailurepolicy="continue" verbose="2">
+<suite name="ciFull" configfailurepolicy="continue">
<test name="Category">
<classes>
<class name="org.onap.sdc.backend.ci.tests.execute.category.CatalogDataApiTest"/>
diff --git a/integration-tests/src/test/resources/ci/testSuites/backend/externalAPIs.xml b/integration-tests/src/test/resources/ci/testSuites/backend/externalAPIs.xml
index 637ec3e..41d6f6e 100644
--- a/integration-tests/src/test/resources/ci/testSuites/backend/externalAPIs.xml
+++ b/integration-tests/src/test/resources/ci/testSuites/backend/externalAPIs.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="externalApis" configfailurepolicy="continue" verbose="2" parallel="methods" thread-count="1" data-provider-thread-count="8">
+<suite name="externalApis" configfailurepolicy="continue" parallel="methods" thread-count="1" data-provider-thread-count="8">
<test name="ExternalApis">
<classes>
diff --git a/integration-tests/src/test/resources/ci/testSuites/backend/onapApiSanity.xml b/integration-tests/src/test/resources/ci/testSuites/backend/onapApiSanity.xml
index 9f18910..8d5d2b2 100644
--- a/integration-tests/src/test/resources/ci/testSuites/backend/onapApiSanity.xml
+++ b/integration-tests/src/test/resources/ci/testSuites/backend/onapApiSanity.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="externalApis" configfailurepolicy="continue" verbose="2" parallel="methods" thread-count="1" data-provider-thread-count="1">
+<suite name="externalApis" configfailurepolicy="continue" parallel="methods" thread-count="1" data-provider-thread-count="1">
<parameter name="makeDistribution" value="false"/>
<parameter name="makeToscaValidation" value="true"/>
<test name="ExternalApis">
diff --git a/integration-tests/src/test/resources/ci/testSuites/backend/pass.xml b/integration-tests/src/test/resources/ci/testSuites/backend/pass.xml
index 00df382..c124a4d 100644
--- a/integration-tests/src/test/resources/ci/testSuites/backend/pass.xml
+++ b/integration-tests/src/test/resources/ci/testSuites/backend/pass.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="externalApis" configfailurepolicy="continue" verbose="2" parallel="methods" thread-count="1" data-provider-thread-count="1">
+<suite name="externalApis" configfailurepolicy="continue" parallel="methods" thread-count="1" data-provider-thread-count="1">
<parameter name="makeDistribution" value="false"/>
<parameter name="makeToscaValidation" value="true"/>
<test name="passTest">
diff --git a/integration-tests/src/test/resources/ci/testSuites/backend/productAPIs.xml b/integration-tests/src/test/resources/ci/testSuites/backend/productAPIs.xml
index bd5f06d..ac7af87 100644
--- a/integration-tests/src/test/resources/ci/testSuites/backend/productAPIs.xml
+++ b/integration-tests/src/test/resources/ci/testSuites/backend/productAPIs.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="productAPIs" configfailurepolicy="continue" verbose="2" parallel="tests"
+<suite name="productAPIs" configfailurepolicy="continue" parallel="tests"
thread-count="6">
<test name="Test">
diff --git a/integration-tests/src/test/resources/ci/testSuites/backend/resource.xml b/integration-tests/src/test/resources/ci/testSuites/backend/resource.xml
index c2dd490..25fc105 100644
--- a/integration-tests/src/test/resources/ci/testSuites/backend/resource.xml
+++ b/integration-tests/src/test/resources/ci/testSuites/backend/resource.xml
@@ -2,7 +2,7 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Sanity" configfailurepolicy="continue">
- <test verbose="2" name="Sanity">
+ <test name="Sanity">
<classes>
<class name="org.onap.sdc.backend.ci.tests.execute.category.CatalogDataApiTest"/>
diff --git a/integration-tests/src/test/resources/ci/testSuites/backend/sanity.xml b/integration-tests/src/test/resources/ci/testSuites/backend/sanity.xml
index 09323f2..cc4aeda 100644
--- a/integration-tests/src/test/resources/ci/testSuites/backend/sanity.xml
+++ b/integration-tests/src/test/resources/ci/testSuites/backend/sanity.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="Sanity" configfailurepolicy="continue" verbose="2">
+<suite name="Sanity" configfailurepolicy="continue">
<test name="sanityE2Eflows">
<classes>
diff --git a/integration-tests/src/test/resources/logback.xml b/integration-tests/src/test/resources/logback.xml
new file mode 100644
index 0000000..559b695
--- /dev/null
+++ b/integration-tests/src/test/resources/logback.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <property scope="system" name="ECOMP-component-name" value="SDC"/>
+ <property scope="system" name="ECOMP-subcomponent-name" value="SDC-TOOL"/>
+ <property name="default-log-pattern"
+ value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{uuid}|%X{serviceInstanceID}|%thread||${ECOMP-subcomponent-name}|%X{userId}|%level|%X{alarmSeverity}|%X{localAddr}|${beFqdn}|%X{remoteAddr}|%logger{35}|%X{timer}|ActivityType=<%M>, Desc=<%msg>%n"/>
+
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>${default-log-pattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="DEBUG_ROLLING"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${HOME}/asdctool/logs/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log</file>
+
+
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${HOME}/asdctool/logs/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log.%i
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>10</maxIndex>
+ </rollingPolicy>
+
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>20MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>${default-log-pattern}</pattern>
+ </encoder>
+ </appender>
+
+ <root level="INFO">
+ <appender-ref ref="DEBUG_ROLLING"/>
+ <appender-ref ref="STDOUT"/>
+ </root>
+
+ <logger name="org.openecomp.sdc" level="INFO"/>
+ <logger name="org.openecomp.sdc.asdctool.migration" level="INFO"/>
+
+</configuration>