diff options
Diffstat (limited to 'ms/controllerblueprints')
-rw-r--r-- | ms/controllerblueprints/application/src/test/resources/logback-test.xml (renamed from ms/controllerblueprints/application/src/test/resources/logback.xml) | 70 | ||||
-rw-r--r-- | ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt | 14 | ||||
-rw-r--r-- | ms/controllerblueprints/modules/blueprint-core/src/test/resources/logback-test.xml | 31 | ||||
-rw-r--r-- | ms/controllerblueprints/modules/service/src/test/resources/logback-test.xml (renamed from ms/controllerblueprints/modules/service/src/test/resources/logback.xml) | 9 |
4 files changed, 78 insertions, 46 deletions
diff --git a/ms/controllerblueprints/application/src/test/resources/logback.xml b/ms/controllerblueprints/application/src/test/resources/logback-test.xml index 55b008d11..2252939e7 100644 --- a/ms/controllerblueprints/application/src/test/resources/logback.xml +++ b/ms/controllerblueprints/application/src/test/resources/logback-test.xml @@ -1,35 +1,35 @@ -<!--
- ~ Copyright © 2017-2018 AT&T Intellectual Property.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<configuration>
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <!-- encoders are assigned the type
- ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
- <encoder>
- <pattern>%d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n</pattern>
- </encoder>
- </appender>
-
-
- <logger name="org.springframework" level="warn"/>
- <logger name="org.hibernate" level="info"/>
- <logger name="org.onap.ccsdk.cds.controllerblueprints" level="info"/>
-
- <root level="warn">
- <appender-ref ref="STDOUT"/>
- </root>
-
-</configuration>
+<!-- + ~ Copyright © 2017-2018 AT&T Intellectual Property. + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<configuration> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <!-- encoders are assigned the type + ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> + <encoder> + <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n</pattern> + </encoder> + </appender> + + + <logger name="org.springframework" level="warn"/> + <logger name="org.hibernate" level="info"/> + <logger name="org.onap.ccsdk.cds.controllerblueprints" level="info"/> + + <root level="warn"> + <appender-ref ref="STDOUT"/> + </root> + +</configuration> diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt b/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt index 08b77bd4e..5da43484c 100644 --- a/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt +++ b/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt @@ -17,20 +17,22 @@ package org.onap.ccsdk.cds.controllerblueprints.core.utils import org.junit.Test +import org.slf4j.LoggerFactory class TopologicalSortingUtilsTest { - + + private val log = LoggerFactory.getLogger(TopologicalSortingUtilsTest::class.java) @Test - fun testSorting(): Unit { + fun testSorting() { val graph: TopologicalSortingUtils<String> = TopologicalSortingUtils() graph.add("bundle-id", "bundle-mac") graph.add("bundle-id", "bundle-ip") graph.add("bundle-mac", "bundle-ip") graph.add("bundle-ip", "bundle-mac") - println("The current graph: " + graph) - println("In-degrees: " + graph.inDegree()) - println("Out-degrees: " + graph.outDegree()) - println("A topological sort of the vertices: " + graph.topSort()) + log.debug("The current graph: $graph") + log.debug("In-degrees: " + graph.inDegree()) + log.debug("Out-degrees: " + graph.outDegree()) + log.debug("A topological sort of the vertices: " + graph.topSort()) } }
\ No newline at end of file diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/logback-test.xml b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/logback-test.xml new file mode 100644 index 000000000..83e0bc674 --- /dev/null +++ b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/logback-test.xml @@ -0,0 +1,31 @@ +<!-- + ~ Copyright © 2019 IBM. + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<configuration> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <!-- encoders are assigned the type + ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> + <encoder> + <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n</pattern> + </encoder> + </appender> + + <logger name="org.onap.ccsdk.cds.controllerblueprints" level="info"/> + <root level="info"> + <appender-ref ref="STDOUT"/> + </root> + +</configuration> diff --git a/ms/controllerblueprints/modules/service/src/test/resources/logback.xml b/ms/controllerblueprints/modules/service/src/test/resources/logback-test.xml index e66127977..feb4514d6 100644 --- a/ms/controllerblueprints/modules/service/src/test/resources/logback.xml +++ b/ms/controllerblueprints/modules/service/src/test/resources/logback-test.xml @@ -17,13 +17,11 @@ <configuration> - <property name="localPattern" value="[%-8thread] %d{HH:mm:ss.SSS} %-5level %logger{50} - %msg%n" /> - - <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> - <pattern>${localPattern}</pattern> + <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n</pattern> </encoder> </appender> @@ -31,7 +29,8 @@ <logger name="org.springframework" level="warn"/> <logger name="org.springframework.web" level="warn"/> <logger name="org.hibernate" level="error"/> - <logger name="org.onap.ccsdk.cds" level="info"/> + <logger name="org.onap.ccsdk.cds.controllerblueprints.core" level="warn"/> + <logger name="org.onap.ccsdk.cds.controllerblueprints" level="info"/> <root level="warn"> <appender-ref ref="STDOUT"/> |