library/roles/smartgears/smartgears/templates/logback.xml.j2: Fix the date that's written into the log lines. See https://support.d4science.org/issues/11201.

This commit is contained in:
Andrea Dell'Amico 2018-02-16 14:42:32 +01:00
parent a9e31abb4e
commit e6f3f9d927
1 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@
<file>{{ smartgears_log_dir }}/ghn.log</file> <file>{{ smartgears_log_dir }}/ghn.log</file>
<append>true</append> <append>true</append>
<encoder> <encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{0}: %msg%n</pattern> <pattern>%date [%thread] %-5level %logger{0}: %msg%n</pattern>
</encoder> </encoder>
{% if smartgears_log_use_timesize_appender %} {% if smartgears_log_use_timesize_appender %}
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
@ -24,7 +24,7 @@
<file>{{ smartgears_log_dir }}/accounting.log</file> <file>{{ smartgears_log_dir }}/accounting.log</file>
<append>true</append> <append>true</append>
<encoder> <encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{0}: %msg%n</pattern> <pattern>%date [%thread] %-5level %logger{0}: %msg%n</pattern>
</encoder> </encoder>
{% if smartgears_log_use_timesize_appender %} {% if smartgears_log_use_timesize_appender %}
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
@ -45,7 +45,7 @@
<file>{{ smartgears_log_dir }}/access.log</file> <file>{{ smartgears_log_dir }}/access.log</file>
<append>true</append> <append>true</append>
<encoder> <encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{0}: %msg%n</pattern> <pattern>%date [%thread] %-5level %logger{0}: %msg%n</pattern>
</encoder> </encoder>
{% if smartgears_log_use_timesize_appender %} {% if smartgears_log_use_timesize_appender %}
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
@ -67,7 +67,7 @@
<file>{{ smartgears_log_dir }}/analysis.log</file> <file>{{ smartgears_log_dir }}/analysis.log</file>
<append>true</append> <append>true</append>
<encoder> <encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{0}: %msg%n</pattern> <pattern>%date [%thread] %-5level %logger{0}: %msg%n</pattern>
</encoder> </encoder>
{% if smartgears_log_use_timesize_appender %} {% if smartgears_log_use_timesize_appender %}
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
@ -99,7 +99,7 @@
<file>/home/gcube/tomcat/logs/{{ obj.appender_file_name }}.log</file> <file>/home/gcube/tomcat/logs/{{ obj.appender_file_name }}.log</file>
<append>true</append> <append>true</append>
<encoder> <encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{0}: %msg%n</pattern> <pattern>%date [%thread] %-5level %logger{0}: %msg%n</pattern>
</encoder> </encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>/home/gcube/tomcat/logs/{{ obj.appender_file_name | default('custom') }}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> <fileNamePattern>/home/gcube/tomcat/logs/{{ obj.appender_file_name | default('custom') }}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>