-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from swisscom/feature/release-pipeline
publish release and develop changes. Updates logback configuration
- Loading branch information
Showing
5 changed files
with
137 additions
and
73 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Only the specified owner can approve changes to workflow files | ||
/.github/workflows/ @swisscom/swisscom-health |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Publish release | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
publish-release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout latest code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
|
||
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. | ||
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 | ||
|
||
- name: Build and publish with Gradle Wrapper | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: ./gradlew clean build publishVersion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,66 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration scan="true"> | ||
|
||
<logger name="org.springframework" level="INFO" /> | ||
<logger name="org.springframework" level="INFO"/> | ||
|
||
<property name="LOG_LEVEL_PATTERN" value="%highlight(%level)" /> | ||
<property name="LOG_EXCEPTION_CONVERSION_WORD" value="%rEx" /> | ||
<property name="LOG_LEVEL_PATTERN" value="%highlight(%level)"/> | ||
<property name="LOG_EXCEPTION_CONVERSION_WORD" value="%rEx"/> | ||
|
||
<springProfile name="!any"> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>%highlight(%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}) | %highlight(${LOG_LEVEL_PATTERN:-%5p}) | %highlight(%magenta(${PID:- })) | %highlight(%yellow(%X{traceId:-None})) | %highlight([%15.15t]) | %highlight(%cyan(%-40.40logger{39})) | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%ex} | ||
</pattern> | ||
</encoder> | ||
</appender> | ||
<root level="INFO"> | ||
<appender-ref ref="STDOUT" /> | ||
</root> | ||
</springProfile> | ||
<appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>${LOGGING_FILE_NAME:-./cdr-client.log}</file> | ||
<append>true</append> | ||
|
||
<springProfile name="customer"> | ||
<appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>${LOGGING_FILE_NAME:-./cdr-client.log}</file> | ||
<append>true</append> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | ||
<fileNamePattern>${LOGGING_FILE_NAME:-./cdr-client.log}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> | ||
<maxFileSize>${LOGGING_LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-100MB}</maxFileSize> | ||
<maxHistory>${LOGGING_LOGBACK_ROLLINGPOLICY_MAX_HISTORY:-2}</maxHistory> | ||
</rollingPolicy> | ||
|
||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | ||
<fileNamePattern>${LOGGING_FILE_NAME:-./cdr-client.log}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> | ||
<maxFileSize>${LOGGING_LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-100MB}</maxFileSize> | ||
<maxHistory>${LOGGING_LOGBACK_ROLLINGPOLICY_MAX_HISTORY:-2}</maxHistory> | ||
</rollingPolicy> | ||
|
||
<encoder> | ||
<pattern>%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC} | ${%level:-%5p} | ${PID:- } | %X{traceId:-None} | [%15.15t] | %-40.40logger{39} | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%ex} | ||
</pattern> | ||
</encoder> | ||
</appender> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder"> | ||
<providers> | ||
<timestamp> | ||
<fieldName>timestamp</fieldName> | ||
<timeZone>UTC</timeZone> | ||
</timestamp> | ||
<loggerName> | ||
<fieldName>logger</fieldName> | ||
</loggerName> | ||
<logLevel> | ||
<fieldName>level</fieldName> | ||
</logLevel> | ||
<threadName> | ||
<fieldName>thread</fieldName> | ||
</threadName> | ||
<nestedField> | ||
<fieldName>mdc</fieldName> | ||
<providers> | ||
<mdc /> | ||
</providers> | ||
</nestedField> | ||
<stackTrace> | ||
<fieldName>stackTrace</fieldName> | ||
<!-- maxLength - limit the length of the stack trace --> | ||
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter"> | ||
<maxDepthPerThrowable>200</maxDepthPerThrowable> | ||
<maxLength>14000</maxLength> | ||
<rootCauseFirst>true</rootCauseFirst> | ||
</throwableConverter> | ||
</stackTrace> | ||
<message /> | ||
<throwableClassName> | ||
<fieldName>exceptionClass</fieldName> | ||
</throwableClassName> | ||
</providers> | ||
</encoder> | ||
</appender> | ||
<root level="INFO"> | ||
<appender-ref ref="ROLLING" /> | ||
<appender-ref ref="STDOUT" /> | ||
</root> | ||
</springProfile> | ||
<encoder> | ||
<pattern>%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC} | ${%level:-%5p} | ${PID:- } | %X{traceId:-None} | [%15.15t] | %-40.40logger{39} | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%ex}</pattern> | ||
</encoder> | ||
</appender> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder"> | ||
<providers> | ||
<timestamp> | ||
<fieldName>timestamp</fieldName> | ||
<timeZone>UTC</timeZone> | ||
</timestamp> | ||
<loggerName> | ||
<fieldName>logger</fieldName> | ||
</loggerName> | ||
<logLevel> | ||
<fieldName>level</fieldName> | ||
</logLevel> | ||
<threadName> | ||
<fieldName>thread</fieldName> | ||
</threadName> | ||
<nestedField> | ||
<fieldName>mdc</fieldName> | ||
<providers> | ||
<mdc/> | ||
</providers> | ||
</nestedField> | ||
<stackTrace> | ||
<fieldName>stackTrace</fieldName> | ||
<!-- maxLength - limit the length of the stack trace --> | ||
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter"> | ||
<maxDepthPerThrowable>200</maxDepthPerThrowable> | ||
<maxLength>14000</maxLength> | ||
<rootCauseFirst>true</rootCauseFirst> | ||
</throwableConverter> | ||
</stackTrace> | ||
<message/> | ||
<throwableClassName> | ||
<fieldName>exceptionClass</fieldName> | ||
</throwableClassName> | ||
</providers> | ||
</encoder> | ||
</appender> | ||
<root level="INFO"> | ||
<appender-ref ref="ROLLING"/> | ||
<appender-ref ref="STDOUT"/> | ||
</root> | ||
|
||
</configuration> |