Skip to content

Commit

Permalink
Examples update
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Feb 12, 2024
1 parent dd3e3cf commit dbf20b2
Show file tree
Hide file tree
Showing 10 changed files with 171 additions and 94 deletions.
25 changes: 20 additions & 5 deletions example-cucumber/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2024 EPAM Systems
~
~ 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>

<!-- Send debug messages to System.out -->
Expand All @@ -17,19 +33,18 @@
</encoder>
</appender>

<!--'additivity' flag is important! Without it logback will double-log log messages-->
<!-- We turned off framework logging by setting root level="WARN" to avoid logging encoded data into console. By setting level="TRACE"
for "binary_data_logger" and connected it only to RP appender to log that data to ReportPortal. The 'additivity' flag is important!
Without it logback will double-log log messages -->
<logger name="binary_data_logger" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>

<logger name="com.epam.reportportal.service" level="WARN"/>
<logger name="com.epam.reportportal.utils" level="WARN"/>
<logger name="com.epam.reportportal.example" level="TRACE"/>

<!-- By default, the level of the root level is set to DEBUG -->
<root level="WARN">
<appender-ref ref="RP"/>
<appender-ref ref="STDOUT"/>
</root>


</configuration>
28 changes: 20 additions & 8 deletions example-cucumber2/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2024 EPAM Systems
~
~ 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>

<!-- Send debug messages to System.out -->
Expand All @@ -17,22 +33,18 @@
</encoder>
</appender>

<!--'additivity' flag is important! Without it logback will double-log log messages-->
<!-- We turned off framework logging by setting root level="WARN" to avoid logging encoded data into console. By setting level="TRACE"
for "binary_data_logger" and connected it only to RP appender to log that data to ReportPortal. The 'additivity' flag is important!
Without it logback will double-log log messages -->
<logger name="binary_data_logger" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>
<logger name="com.epam.reportportal.example" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>

<logger name="com.epam.reportportal.service" level="WARN"/>
<logger name="com.epam.reportportal.utils" level="WARN"/>
<logger name="com.epam.reportportal.example" level="TRACE"/>

<!-- By default, the level of the root level is set to DEBUG -->
<root level="WARN">
<appender-ref ref="RP"/>
<appender-ref ref="STDOUT"/>
</root>


</configuration>
13 changes: 5 additions & 8 deletions example-cucumber4/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2021 EPAM Systems
~ Copyright 2024 EPAM Systems
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,16 +33,13 @@
</encoder>
</appender>

<!--'additivity' flag is important! Without it logback will double-log log messages-->
<!-- We turned off framework logging by setting root level="WARN" to avoid logging encoded data into console. By setting level="TRACE"
for "binary_data_logger" and connected it only to RP appender to log that data to ReportPortal. The 'additivity' flag is important!
Without it logback will double-log log messages -->
<logger name="binary_data_logger" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>
<logger name="com.epam.reportportal.example" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>

<logger name="com.epam.reportportal.service" level="WARN"/>
<logger name="com.epam.reportportal.utils" level="WARN"/>
<logger name="com.epam.reportportal.example" level="TRACE"/>

<!-- By default, the level of the root level is set to DEBUG -->
<root level="WARN">
Expand Down
14 changes: 7 additions & 7 deletions example-cucumber6-testng/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2021 EPAM Systems
~ Copyright 2024 EPAM Systems
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,16 +33,16 @@
</encoder>
</appender>

<!--'additivity' flag is important! Without it logback will double-log log messages-->
<logger name="binary_data_logger" level="DEBUG" additivity="false">
<!-- We turned off framework logging by setting root level="WARN" to avoid logging encoded data into console. By setting level="TRACE"
for "binary_data_logger" and connected it only to RP appender to log that data to ReportPortal. The 'additivity' flag is important!
Without it logback will double-log log messages -->
<logger name="binary_data_logger" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>

<logger name="com.epam.reportportal.service" level="WARN"/>
<logger name="com.epam.reportportal.utils" level="WARN"/>
<logger name="com.epam.reportportal.example" level="TRACE"/>

<!-- By default, the level of the root level is set to DEBUG -->
<root level="INFO">
<root level="WARN">
<appender-ref ref="RP"/>
<appender-ref ref="STDOUT"/>
</root>
Expand Down
15 changes: 6 additions & 9 deletions example-cucumber6/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2021 EPAM Systems
~ Copyright 2024 EPAM Systems
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,16 +33,13 @@
</encoder>
</appender>

<!--'additivity' flag is important! Without it logback will double-log log messages-->
<logger name="binary_data_logger" level="DEBUG" additivity="false">
<!-- We turned off framework logging by setting root level="WARN" to avoid logging encoded data into console. By setting level="TRACE"
for "binary_data_logger" and connected it only to RP appender to log that data to ReportPortal. The 'additivity' flag is important!
Without it logback will double-log log messages -->
<logger name="binary_data_logger" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>
<logger name="com.epam.reportportal.example" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>

<logger name="com.epam.reportportal.service" level="WARN"/>
<logger name="com.epam.reportportal.utils" level="WARN"/>
<logger name="com.epam.reportportal.example" level="TRACE"/>

<!-- By default, the level of the root level is set to DEBUG -->
<root level="WARN">
Expand Down
71 changes: 42 additions & 29 deletions example-junit/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!--
~ Copyright 2024 EPAM Systems
~
~ 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.
-->

<!-- Send debug messages to System.out -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- By default, encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{5} - %thread - %msg%n</pattern>
</encoder>
</appender>
<configuration>

<appender name="RP" class="com.epam.reportportal.logback.appender.ReportPortalAppender">
<encoder>
<!--Best practice: don't put time and logging level to the final message. Appender do this for you-->
<pattern>%d{HH:mm:ss.SSS} [%t] %-5level - %msg%n</pattern>
<pattern>[%t] - %msg%n</pattern>
</encoder>
</appender>
<!-- Send debug messages to System.out -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- By default, encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{5} - %thread - %msg%n</pattern>
</encoder>
</appender>

<!--'additivity' flag is important! Without it logback will double-log log messages-->
<logger name="binary_data_logger" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>
<logger name="com.epam.reportportal.example" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>
<appender name="RP" class="com.epam.reportportal.logback.appender.ReportPortalAppender">
<encoder>
<!--Best practice: don't put time and logging level to the final message. Appender do this for you-->
<pattern>%d{HH:mm:ss.SSS} [%t] %-5level - %msg%n</pattern>
<pattern>[%t] - %msg%n</pattern>
</encoder>
</appender>

<logger name="com.epam.reportportal.service" level="WARN"/>
<logger name="com.epam.reportportal.utils" level="WARN"/>
<!-- We turned off framework logging by setting root level="WARN" to avoid logging encoded data into console. By setting level="TRACE"
for "binary_data_logger" and connected it only to RP appender to log that data to ReportPortal. The 'additivity' flag is important!
Without it logback will double-log log messages -->
<logger name="binary_data_logger" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>
<logger name="com.epam.reportportal.example" level="TRACE"/>

<!-- By default, the level of the root level is set to DEBUG -->
<root level="WARN">
<appender-ref ref="RP"/>
<appender-ref ref="STDOUT"/>
</root>
<!-- By default, the level of the root level is set to DEBUG -->
<root level="WARN">
<appender-ref ref="RP"/>
<appender-ref ref="STDOUT"/>
</root>

</configuration>
31 changes: 21 additions & 10 deletions example-junit5/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2024 EPAM Systems
~
~ 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>

<!-- Send debug messages to System.out -->
Expand All @@ -13,27 +29,22 @@
<encoder>
<!--Best practice: don't put time and logging level to the final message. Appender do this for you-->
<pattern>%d{HH:mm:ss.SSS} [%t] %-5level - %msg%n</pattern>
<pattern>%logger{5} - [%t] - %msg%n</pattern>
<pattern>[%t] - %msg%n</pattern>
</encoder>
</appender>

<!--'additivity' flag is important! Without it logback will double-log log messages-->
<!-- We turned off framework logging by setting root level="WARN" to avoid logging encoded data into console. By setting level="TRACE"
for "binary_data_logger" and connected it only to RP appender to log that data to ReportPortal. The 'additivity' flag is important!
Without it logback will double-log log messages -->
<logger name="binary_data_logger" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>
<logger name="com.epam.reportportal.example" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>

<logger name="com.epam.reportportal.service" level="WARN"/>
<logger name="com.epam.reportportal.utils" level="WARN"/>
<logger name="com.codeborne.selenide" level="WARN"/>
<logger name="com.epam.reportportal.example" level="TRACE"/>

<!-- By default, the level of the root level is set to DEBUG -->
<root level="WARN">
<appender-ref ref="RP"/>
<appender-ref ref="STDOUT"/>
</root>


</configuration>
13 changes: 6 additions & 7 deletions example-spock/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2021 EPAM Systems
~ Copyright 2024 EPAM Systems
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,19 +33,18 @@
</encoder>
</appender>

<!--'additivity' flag is important! Without it logback will double-log log messages-->
<!-- We turned off framework logging by setting root level="WARN" to avoid logging encoded data into console. By setting level="TRACE"
for "binary_data_logger" and connected it only to RP appender to log that data to ReportPortal. The 'additivity' flag is important!
Without it logback will double-log log messages -->
<logger name="binary_data_logger" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>

<logger name="com.epam.reportportal.service" level="WARN"/>
<logger name="com.epam.reportportal.utils" level="WARN"/>
<logger name="com.epam.reportportal.example" level="TRACE"/>

<!-- By default, the level of the root level is set to DEBUG -->
<root level="TRACE">
<root level="WARN">
<appender-ref ref="RP"/>
<appender-ref ref="STDOUT"/>
</root>


</configuration>
25 changes: 21 additions & 4 deletions example-testng-fork-execution/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2024 EPAM Systems
~
~ 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>

<!-- Send debug messages to System.out -->
Expand All @@ -17,17 +33,18 @@
</encoder>
</appender>

<!--'additivity' flag is important! Without it logback will double-log log messages-->
<!-- We turned off framework logging by setting root level="WARN" to avoid logging encoded data into console. By setting level="TRACE"
for "binary_data_logger" and connected it only to RP appender to log that data to ReportPortal. The 'additivity' flag is important!
Without it logback will double-log log messages -->
<logger name="binary_data_logger" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>

<logger name="com.epam.reportportal.example" level="TRACE"/>

<!-- By default, the level of the root level is set to DEBUG -->
<root level="DEBUG">
<root level="WARN">
<appender-ref ref="RP"/>
<appender-ref ref="STDOUT"/>
</root>


</configuration>
Loading

0 comments on commit dbf20b2

Please sign in to comment.