Skip to content

Commit 723772b

Browse files
Merge pull request #843 from ExpediaGroup/fix-incorrect-zone-in-logback-config
fix(logback): incorrect zone id format in logback config
2 parents 515d769 + 0c8df75 commit 723772b

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

components/proxy/src/main/java/com/hotels/styx/infrastructure/logging/LOGBackConfigurer.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
import java.io.FileNotFoundException;
2727
import java.net.MalformedURLException;
2828
import java.net.URL;
29+
import java.time.zone.ZoneRulesException;
2930
import java.util.logging.Handler;
31+
import java.util.logging.Level;
3032
import java.util.logging.LogManager;
3133
import java.util.logging.Logger;
3234

@@ -113,7 +115,8 @@ public static void initLogging(URL url, boolean installJULBridge) {
113115
SLF4JBridgeHandler.install();
114116

115117
}
116-
} catch (JoranException e) {
118+
} catch (JoranException | ZoneRulesException e) {
119+
Logger.getLogger(LOGBackConfigurer.class.getName()).log(Level.SEVERE, "exception while initializing LOGBack", e);
117120
throw new IllegalArgumentException("exception while initializing LOGBack", e);
118121
}
119122
}

distribution/conf/env-development/logback.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<property name="EXCEPTION_MDC_VALUES_SUB_TEMPLATE" value=''/>
1212
<property name="LAYOUT_PATTERN_BODY" value="%m%n%styx_exception_data"/>
13-
<property name="LAYOUT_PATTERN_PREFIX" value="%-5p %d{yyyy-MM-dd HH:mm:ss,SSSZZ} [%c{5}] [build=${release.label}] [%t]"/>
13+
<property name="LAYOUT_PATTERN_PREFIX" value="%-5p %d{yyyy-MM-dd HH:mm:ss.SSSZZ} [%c{5}] [build=${release.label}] [%t]"/>
1414
<property name="LAYOUT_PATTERN" value="${LAYOUT_PATTERN_PREFIX} - ${LAYOUT_PATTERN_BODY}"/>
1515

1616
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">

distribution/conf/env-perf-local/logback.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<conversionRule conversionWord="styx_exception_data" converterClass="com.hotels.styx.infrastructure.logging.ExceptionConverter" />
1010

1111
<property name="LAYOUT_PATTERN_BODY" value="%m%n%styx_exception_data"/>
12-
<property name="LAYOUT_PATTERN_PREFIX" value="%-5p %d{yyyy-MM-dd HH:mm:ss,SSSZZ} [%c{5}] [build=${release.label}] [%t]"/>
12+
<property name="LAYOUT_PATTERN_PREFIX" value="%-5p %d{yyyy-MM-dd HH:mm:ss.SSSZZ} [%c{5}] [build=${release.label}] [%t]"/>
1313
<property name="LAYOUT_PATTERN" value="${LAYOUT_PATTERN_PREFIX} - ${LAYOUT_PATTERN_BODY}"/>
1414

1515
<!---->

distribution/conf/logback.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<property name="EXCEPTION_MDC_VALUES_SUB_TEMPLATE" value=''/>
1212
<property name="LAYOUT_PATTERN_BODY" value="%m%n%styx_exception_data"/>
13-
<property name="LAYOUT_PATTERN_PREFIX" value="%-5p %d{yyyy-MM-dd HH:mm:ss,SSSZZ} [%c{5}] [build=${release.label}] [%t]"/>
13+
<property name="LAYOUT_PATTERN_PREFIX" value="%-5p %d{yyyy-MM-dd HH:mm:ss.SSSZZ} [%c{5}] [build=${release.label}] [%t]"/>
1414
<property name="LAYOUT_PATTERN" value="${LAYOUT_PATTERN_PREFIX} - ${LAYOUT_PATTERN_BODY}"/>
1515

1616
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">

0 commit comments

Comments
 (0)