Goal:
Fusion log entries are in the UTC time zone by default. This article explains how to change the time zone to a different one, if desired.
Environment:
Fusion 4.2.6 and above
Guide:
You can change the time zone with the following instructions:
NOTE: Follow these steps to change the core.<date>.log, connectors.<date>.log and ui.<date>.log files timestamps.
1. Identify the log4j-connectors.xml, log4j-core.xml and log4j-ui.xml configuration files in [LWE_HOME]/conf
2. Edit the above configuration file using a text editor
3. Locate the line that contains org.apache.log4j.PatternLayout
<layout class="org.apache.log4j.PatternLayout">
<param value="%d{ISO8601} %p %c{2} - %m%n" name="ConversionPattern"/>
</layout>
4. Replace org.apache.log4j.PatternLayout with org.apache.log4j.EnhancedPatternLayout
5. Append the time zone after %d{ISO8601} in the format {GMT-<hour difference>}.
For instance:
<layout class="org.apache.log4j.EnhancedPatternLayout">
<param value="%d{ISO8601}{GMT-8} %p %c{2} - %m%n" name="ConversionPattern"/>
</layout>
6. Save the file
7. Repeat for each of the log4j-xml files
NOTE: Follow these steps to change the core.request.<date>.log, connectors.request.<date>.log and the ui.request.<date>.log files timestamps.
8. Locate and edit each of the following files:
[LWE_HOME]/conf/jetty/lwe-core/etc/jetty.xml
[LWE_HOME]/conf/jetty/connectors/etc/jetty.xml
[LWE_HOME]/conf/jetty/lwe-ui/etc/jetty.xml
9. Find the line that contains the LogTimeZone property:
<Set name="LogTimeZone">UTC</Set>
10. Change the time zone to the desired value, using the long Time Zone ID format.
For instance, to change it to Pacific Time:
<Set name="LogTimeZone">America/Los_Angeles</Set>
Note: For a complete list of time zone IDs reference here.
11. Save the jetty.xml file
12. Repeat for each of the LucidWorks request log file
13. Restart the LucidWorks services to apply all the changes
Comments
0 comments
Article is closed for comments.