Skip to content

Commit

Permalink
Changed logging for prepare #3233
Browse files Browse the repository at this point in the history
  • Loading branch information
lorriborri committed Jun 27, 2024
1 parent 4529716 commit 7739ae6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 43 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ src-gen/
.idea/
*.ipr
*.iws
out/

# vscode parts
.vscode/
Expand Down
2 changes: 1 addition & 1 deletion sechub-pds-solutions/prepare/docker/pds-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"id": "PDS_PREPARE",
"path": "/pds/scripts/prepare.sh",
"envWhitelist" : [ "TOOL_FOLDER","PDS_STORAGE_*" ],
"envWhitelist" : [ "TOOL_FOLDER","PDS_STORAGE_*","HTTPS_PROXY","NO_PROXY"],
"scanType": "prepare",
"description": "Runs the prepare wrapper application to prepare remote data for SecHub scans.",

Expand Down
30 changes: 30 additions & 0 deletions sechub-wrapper-prepare/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>

<configuration>
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />

<springProperty name="springApplicationName" source="spring.application.name"/>

<appender name="LOGSTASH_JSON" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="net.logstash.logback.encoder.LogstashEncoder">
<!--
see https://github.com/logstash/logstash-logback-encoder#custom-fields
<customFields>{"sechub_trace_id":"${springApplicationName:-}"}</customFields>
-->
</encoder>
</appender>

<logger name="org.hibernate" level="${SYSTEM_LOG_LEVEL:-WARN}"/>
<logger name="org.springframework" level="${SYSTEM_LOG_LEVEL:-WARN}"/>
<logger name="org.flywaydb" level="${SYSTEM_LOG_LEVEL:-WARN}"/>

<logger name="com.mercedesbenz" level="${APP_LOG_LEVEL:-INFO}"/>

<root level="${DEFAULT_LOG_LEVEL:-INFO}">
<appender-ref ref="${LOGGING_TYPE:-CONSOLE}" />
</root>

</configuration>
42 changes: 0 additions & 42 deletions sechub-wrapper-prepare/src/main/resources/logback.xml

This file was deleted.

0 comments on commit 7739ae6

Please sign in to comment.