On LiveUpdate Administrator (LUA) 2.3.x, I hope to check the LUA application log (lua-application.log). But the log files are rotated soon.
How to change the log rotation setting based on daily?
In LUA 2.3.8 and higher version, this feature is managed by log4j2.xml located under \Symantec\LiveUpdate Administrator\tomcat\webapps\lua\WEB-INF\classes\
Replace the RollingFile snippet in log4j2.xml by the above snippet corresponding to the lua-application.log section to be able to roll over the lua-application log files day wise.
<RollingFile name="ROLL" filePattern="C:/Program Files (x86)/Symantec/LiveUpdate Administrator/logs/lua-application.%d{yyyy-MM-dd}.%i.log">
<PatternLayout>
<Pattern>%d [%t] %-5p %c{2} %x - %m%n</Pattern>
</PatternLayout>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="5 MB"/>
<TimeBasedTriggeringPolicy/>
</Policies>
</RollingFile>
In LUA 2.3.7 and lower version, this feature is managed by log4j.xml located under \Symantec\LiveUpdate Administrator\tomcat\webapps\lua\WEB-INF\classes\ . The first section section of the file will contain by default:
<RollingFile name="ROLL" filePattern="D:/Program Files (x86)/Symantec/LiveUpdate Administrator/logs/lua-application-%i.log" fileName=/Program Files (x86)/Symantec/LiveUpdate Administrator/logs/lua-application.log">
<PatternLayout>
<Pattern>%d [%t] %-5p %c{2} %x - %m%n</Pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="5 MB"/>
</Policies>
<DefaultRolloverStrategy max="50"/>
</RollingFile>
org.apache.log4j.RollingFileAppender class rotates the lua-application.log with MaxFileSize.
To change the daily based rotation, please use org.apache.log4j.DailyRollingFileAppender class and param name="DatePattern" like following;
<appender name="ROLL" class="org.apache.log4j.DailyRollingFileAppender">
<param name="Threshold" value="DEBUG"/>
<param name="File" value="C:/Program Files (x86)/Symantec/LiveUpdate Administrator//logs/lua-application.log"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
lua-application.log will be rotated
lua-application.log.yyyy-mm-dd
Note: The rotated files are not removed automatically. And the log files will be large in size.