Article - CS441278
How to transformer logback.xml via XML transformer utility in Thingworx 10
Modified: 17-Jun-2025
Applies To
- ThingWorx Platform 10.0 F000
- logback.xml
Description
- Starting from logback 1.3/Thingworx 10, there are alterations in the syntax of logback.xml
- The incorporation of an
<if>element within<appender>,<logger>, or<root>elements is prohibited and may produce unpredictable outcomes:- Before 1.3:
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <if condition='property("JSON_LOGS_ENABLE").contains("true")'> <then> <encoder class="net.logstash.logback.encoder.LogstashEncoder"> <customFields>{"platformId": "${PLATFORM_ID}" }</customFields> </encoder> </then> <else> <encoder> <pattern>${CONSOLE_LAYOUT_PATTERN}</pattern> </encoder> </else> </if> </appender> - After 1.3:
<if condition='property("JSON_LOGS_ENABLE").contains("true")'> <then> <appender class="ch.qos.logback.core.ConsoleAppender" name="CONSOLE"> <encoder class="net.logstash.logback.encoder.LogstashEncoder"> <customFields>{"platformId": "${PLATFORM_ID}" }</customFields> </encoder> </appender> </then> <else> <appender class="ch.qos.logback.core.ConsoleAppender" name="CONSOLE"> <encoder> <pattern>${CONSOLE_LAYOUT_PATTERN}</pattern> </encoder> </appender> </else> </if>
- Before 1.3:
- Customers utilizing customized logback.xml files are affected
- Adjustments are necessary to align with the new structural regulations
This is a printer-friendly version of Article 441278 and may be out of date. For the latest version click CS441278