Skip to content

Commit

Permalink
FDP-2849: Adding logback config for writing to files cucumber containers
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleHoffman committed Feb 19, 2025
1 parent 8c623ec commit f3751cb
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: Contributors to the GXF project
SPDX-License-Identifier: Apache-2.0
-->

<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
Expand All @@ -14,6 +14,19 @@ SPDX-License-Identifier: Apache-2.0
</encoder>
</appender>

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/target/output/osgp-cucumber-tests-platform-common/logs/cucumber-tests-platform-common.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>/target/output/osgp-cucumber-tests-platform-common/logs/cucumber-tests-platform-common.log.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>100MB</maxFileSize>
<maxHistory>10</maxHistory>
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] [${HOSTNAME}] [%thread] %level %logger{36}@%method:%line - %msg%n</pattern>
</encoder>
</appender>

<logger name="org.springframework" level="ERROR" />
<logger name="org.apache.http.wire" level="ERROR" />
<logger name="cucumber.runtime.java.spring" level="ERROR" />
Expand All @@ -22,6 +35,7 @@ SPDX-License-Identifier: Apache-2.0

<root level="INFO">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE"/>
</root>

</configuration>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: Contributors to the GXF project
SPDX-License-Identifier: Apache-2.0
-->

<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
Expand All @@ -14,14 +14,28 @@ SPDX-License-Identifier: Apache-2.0
</encoder>
</appender>

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/target/output/osgp-cucumber-tests-platform-common/logs/cucumber-tests-platform-common-test.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>/target/output/osgp-cucumber-tests-platform-common/logs/cucumber-tests-platform-common-test.log.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>100MB</maxFileSize>
<maxHistory>10</maxHistory>
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] [${HOSTNAME}] [%thread] %level %logger{36}@%method:%line - %msg%n</pattern>
</encoder>
</appender>

<logger name="org.springframework" level="ERROR" />
<logger name="org.apache.http.wire" level="ERROR" />
<logger name="cucumber.runtime.java.spring" level="ERROR" />
<logger name="com.zaxxer.hikari" level="ERROR" />
<logger name="org.reflections.Reflections" level="ERROR" />

<root level="INFO">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE"/>
</root>

</configuration>
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: Contributors to the GXF project
Expand All @@ -14,6 +15,19 @@ SPDX-License-Identifier: Apache-2.0
</encoder>
</appender>

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/target/output/osgp-cucumber-tests-platform-publiclighting/logs/cucumber-tests-platform-publiclighting.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>/target/output/osgp-cucumber-tests-platform-publiclighting/logs/cucumber-tests-platform-publiclighting.log.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>100MB</maxFileSize>
<maxHistory>10</maxHistory>
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] [${HOSTNAME}] [%thread] %level %logger{36}@%method:%line - %msg%n</pattern>
</encoder>
</appender>

<logger name="org.springframework" level="ERROR" />
<logger name="org.apache.http.wire" level="ERROR" />
<logger name="cucumber.runtime.java.spring" level="ERROR" />
Expand All @@ -22,6 +36,7 @@ SPDX-License-Identifier: Apache-2.0

<root level="INFO">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE"/>
</root>

</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: Contributors to the GXF project
SPDX-License-Identifier: Apache-2.0
-->

<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{yyyy-MM-dd HH:mm:ss.SSS}] [${HOSTNAME}] [%thread] %level %logger{36}@%method:%line - %msg%n</pattern>
</encoder>
</appender>

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/target/output/osgp-cucumber-tests-platform-publiclighting/logs/cucumber-tests-platform-publiclighting-test.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>/target/output/osgp-cucumber-tests-platform-publiclighting/logs/cucumber-tests-platform-publiclighting-test.log.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>100MB</maxFileSize>
<maxHistory>10</maxHistory>
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] [${HOSTNAME}] [%thread] %level %logger{36}@%method:%line - %msg%n</pattern>
</encoder>
</appender>

<logger name="org.springframework" level="ERROR" />
<logger name="org.apache.http.wire" level="ERROR" />
<logger name="cucumber.runtime.java.spring" level="ERROR" />
<logger name="com.zaxxer.hikari" level="ERROR" />
<logger name="org.reflections.Reflections" level="ERROR" />

<root level="INFO">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE"/>
</root>

</configuration>
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: Contributors to the GXF project
Expand All @@ -14,6 +15,19 @@ SPDX-License-Identifier: Apache-2.0
</encoder>
</appender>

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/target/output/osgp-cucumber-tests-platform-smartmetering/logs/cucumber-tests-platform-smartmetering.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>/target/output/osgp-cucumber-tests-platform-smartmetering/logs/cucumber-tests-platform-smartmetering.log.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>100MB</maxFileSize>
<maxHistory>10</maxHistory>
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] [${HOSTNAME}] [%thread] %level %logger{36}@%method:%line - %msg%n</pattern>
</encoder>
</appender>

<logger name="org.springframework" level="ERROR" />
<logger name="org.apache.http.wire" level="ERROR" />
<logger name="cucumber.runtime.java.spring" level="ERROR" />
Expand All @@ -22,6 +36,7 @@ SPDX-License-Identifier: Apache-2.0

<root level="INFO">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE"/>
</root>

</configuration>
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: Contributors to the GXF project
Expand All @@ -14,6 +15,19 @@ SPDX-License-Identifier: Apache-2.0
</encoder>
</appender>

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/target/output/osgp-cucumber-tests-platform-smartmetering/logs/cucumber-tests-platform-smartmetering-test.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>/target/output/osgp-cucumber-tests-platform-smartmetering/logs/cucumber-tests-platform-smartmetering-test.log.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>100MB</maxFileSize>
<maxHistory>10</maxHistory>
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] [${HOSTNAME}] [%thread] %level %logger{36}@%method:%line - %msg%n</pattern>
</encoder>
</appender>

<logger name="org.springframework" level="ERROR" />
<logger name="org.apache.http.wire" level="ERROR" />
<logger name="cucumber.runtime.java.spring" level="ERROR" />
Expand All @@ -22,6 +36,7 @@ SPDX-License-Identifier: Apache-2.0

<root level="INFO">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE"/>
</root>

</configuration>

0 comments on commit f3751cb

Please sign in to comment.