Skip to content

Commit

Permalink
fixed disabling/enabling logging to SYSOUT mechanism by checking fo…
Browse files Browse the repository at this point in the history
…r content of environment variable `DITTO_LOGGING_DISABLE_SYSOUT_LOG`

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle committed Apr 11, 2022
1 parent dd5515d commit 260da1f
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 12 deletions.
15 changes: 13 additions & 2 deletions concierge/service/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,21 @@

<root level="${LOG_LEVEL:-INFO}">
<!-- Logging INFO messages can be disabled by setting environment variable -->
<if condition='isNull("DITTO_LOGGING_DISABLE_SYSOUT_LOG")'>
<if condition='isDefined("DITTO_LOGGING_DISABLE_SYSOUT_LOG")'>
<then>
<appender-ref ref="STDOUT"/>
<if condition='property("DITTO_LOGGING_DISABLE_SYSOUT_LOG").equals("true")'>
<then>
<!-- don't use the "STDOUT" appender -->
</then>
<else>
<appender-ref ref="STDOUT"/>
</else>
</if>
</then>
<else>
<!-- if not defined, assume logging to STDOUT is desired -->
<appender-ref ref="STDOUT"/>
</else>
</if>

<!-- Always log ERRORs to syserr -->
Expand Down
15 changes: 13 additions & 2 deletions connectivity/service/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,21 @@

<root level="${LOG_LEVEL:-INFO}">
<!-- Logging INFO messages can be disabled by setting environment variable -->
<if condition='isNull("DITTO_LOGGING_DISABLE_SYSOUT_LOG")'>
<if condition='isDefined("DITTO_LOGGING_DISABLE_SYSOUT_LOG")'>
<then>
<appender-ref ref="STDOUT"/>
<if condition='property("DITTO_LOGGING_DISABLE_SYSOUT_LOG").equals("true")'>
<then>
<!-- don't use the "STDOUT" appender -->
</then>
<else>
<appender-ref ref="STDOUT"/>
</else>
</if>
</then>
<else>
<!-- if not defined, assume logging to STDOUT is desired -->
<appender-ref ref="STDOUT"/>
</else>
</if>

<!-- Always log ERRORs to syserr -->
Expand Down
15 changes: 13 additions & 2 deletions gateway/service/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,21 @@

<root level="${LOG_LEVEL:-INFO}">
<!-- Logging INFO messages can be disabled by setting environment variable -->
<if condition='isNull("DITTO_LOGGING_DISABLE_SYSOUT_LOG")'>
<if condition='isDefined("DITTO_LOGGING_DISABLE_SYSOUT_LOG")'>
<then>
<appender-ref ref="STDOUT"/>
<if condition='property("DITTO_LOGGING_DISABLE_SYSOUT_LOG").equals("true")'>
<then>
<!-- don't use the "STDOUT" appender -->
</then>
<else>
<appender-ref ref="STDOUT"/>
</else>
</if>
</then>
<else>
<!-- if not defined, assume logging to STDOUT is desired -->
<appender-ref ref="STDOUT"/>
</else>
</if>

<!-- Always log ERRORs to syserr -->
Expand Down
15 changes: 13 additions & 2 deletions policies/service/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,21 @@

<root level="${LOG_LEVEL:-INFO}">
<!-- Logging INFO messages can be disabled by setting environment variable -->
<if condition='isNull("DITTO_LOGGING_DISABLE_SYSOUT_LOG")'>
<if condition='isDefined("DITTO_LOGGING_DISABLE_SYSOUT_LOG")'>
<then>
<appender-ref ref="STDOUT"/>
<if condition='property("DITTO_LOGGING_DISABLE_SYSOUT_LOG").equals("true")'>
<then>
<!-- don't use the "STDOUT" appender -->
</then>
<else>
<appender-ref ref="STDOUT"/>
</else>
</if>
</then>
<else>
<!-- if not defined, assume logging to STDOUT is desired -->
<appender-ref ref="STDOUT"/>
</else>
</if>

<!-- Always log ERRORs to syserr -->
Expand Down
15 changes: 13 additions & 2 deletions things/service/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,21 @@

<root level="${LOG_LEVEL:-INFO}">
<!-- Logging INFO messages can be disabled by setting environment variable -->
<if condition='isNull("DITTO_LOGGING_DISABLE_SYSOUT_LOG")'>
<if condition='isDefined("DITTO_LOGGING_DISABLE_SYSOUT_LOG")'>
<then>
<appender-ref ref="STDOUT"/>
<if condition='property("DITTO_LOGGING_DISABLE_SYSOUT_LOG").equals("true")'>
<then>
<!-- don't use the "STDOUT" appender -->
</then>
<else>
<appender-ref ref="STDOUT"/>
</else>
</if>
</then>
<else>
<!-- if not defined, assume logging to STDOUT is desired -->
<appender-ref ref="STDOUT"/>
</else>
</if>

<!-- Always log ERRORs to syserr -->
Expand Down
15 changes: 13 additions & 2 deletions thingsearch/service/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,21 @@

<root level="${LOG_LEVEL:-INFO}">
<!-- Logging INFO messages can be disabled by setting environment variable -->
<if condition='isNull("DITTO_LOGGING_DISABLE_SYSOUT_LOG")'>
<if condition='isDefined("DITTO_LOGGING_DISABLE_SYSOUT_LOG")'>
<then>
<appender-ref ref="STDOUT"/>
<if condition='property("DITTO_LOGGING_DISABLE_SYSOUT_LOG").equals("true")'>
<then>
<!-- don't use the "STDOUT" appender -->
</then>
<else>
<appender-ref ref="STDOUT"/>
</else>
</if>
</then>
<else>
<!-- if not defined, assume logging to STDOUT is desired -->
<appender-ref ref="STDOUT"/>
</else>
</if>

<!-- Always log ERRORs to syserr -->
Expand Down

0 comments on commit 260da1f

Please sign in to comment.