7.3.5 CE logs configuration process

Jamie Sammons, modified 3 Years ago. New Member Posts: 4 Join Date: 6/2/22 Recent Posts

HI Team,

 

I am using liferay 7.3.5 CE, and deploying it as a docker container in Kubernetes.

​​​​​​​We have a shared folder/persistent volume available in each pod/container. I want to move the log file from usr/local/liferay-ce-portal-7.3.5-ga6/logs to usr/local/persistent volume/folder/logs.

What should I do?

​​​​​​​I have tried to modify "portal-log4j-ext.xml" file and copied it to the "/usr/local/liferay-ce-portal-7.3.5-ga6/tomcat-9.0.37/webapps/ROOT/WEB-INF/classes/META-INF/portal-log4j-ext.xml" folder but it resulted as no log files generating in required destination as well as previous liferay directory logs folder(no logs file generating only .xml file)

I updated it like "usr/local/mnt/logs/liferay-@spi.id@.%d{dd-MM-yyyy}.log" but it didn't work.

 

Below is the part of log4j file which I updated previously,

​​​​​​​<appender class="org.apache.log4j.rolling.RollingFileAppender" name="TEXT_FILE">
        <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
            <param name="FileNamePattern" value="@liferay.home@/logs/liferay-@spi.id@.%d{dd-MM-yyyy}.log" />
        </rollingPolicy>

 

Can anyone please help here?

 

And I also want to have pod name tobe there in logfile name, so please suggest me that also.