Question
Eviden
US
Last activity: 3 Dec 2024 15:01 EST
log rotation, purging and changing the logfile location
Hello greetings,
I have a requirement for log rotation, purging and changing the logfile location. By default log is getting stored in location "work/Catalina/localhost/prweb/*.log".
I want to move these loges file from above location to "/app/Logs/node1/*.log".
Prlog4j2.xml has the following setup for PEGA logs.
<RollingRandomAccessFile name="PEGA" fileName="/work/Catalina/localhost/prweb/.PegaRULES-${date:yyyy-MM-dd}.log" filePattern="work/Catalina/localhost/prweb/.PegaRULES-%d{MM-dd-yyyy}-%i.log.gz"> <PatternLayout> <Pattern>%d [%20.20t] [%10.10X{pegathread}] [%20.20X{tenantid}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n</Pattern> </PatternLayout> <Filters> <!--Deny message logged under ALERT log level--> <ThresholdFilter level="ALERT" onMatch="DENY" onMismatch="NEUTRAL"/> </Filters> <Policies> <TimeBasedTriggeringPolicy interval="12"/> <SizeBasedTriggeringPolicy size="20 MB"/> </Policies> <DefaultRolloverStrategy max="5"/> </RollingRandomAccessFile>
Thanks & Regards,
Ashish