How do i change log file path ?How do i change log file path ?https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1119753762024-03-29T08:10:29Z2024-03-29T08:10:29ZRE: How do i change log file path ?Achmed Tyrannus Albabhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1119850532019-01-11T06:50:55Z2019-01-11T06:50:55Z<p>Thank you.</p>
<p> </p>
<p>And i figured out what was the issue.</p>
<p>Being in windows 7, and trying to store in another drive (especially
in C:/), Liferay needs to be started by Administrator or the log
wouldnt be created.</p>
<p> </p>
<p>Hope this will help people like me in the future.</p>Achmed Tyrannus Albab2019-01-11T06:50:55ZRE: How do i change log file path ?Alfonso Criscihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1119840322019-01-11T06:38:12Z2019-01-11T06:38:12Z<p>Hi Achmed,</p>
<p> </p>
<p>Glad that it eventualy worked <img alt="smiley" height="23"
src="https://community.liferay.com/o/frontend-editor-ckeditor-web/ckeditor/plugins/smiley/images/regular_smile.png"
title="smiley" width="23" /></p>Alfonso Crisci2019-01-11T06:38:12ZRE: How do i change log file path ?Achmed Tyrannus Albabhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1119817612019-01-11T03:42:31Z2019-01-11T03:42:31Z<p>Hi,</p>
<p>Thanks for you solution. It apparently worked.</p>
<p>Ok that time it didnt work, why? I dont know.</p>
<p> </p>
<p>But what i did to make it work ? I just unzip the jar file again.
Re-do the whole damn steps again.</p>
<p>And it worked. After like 40 hours.</p>
<p> </p>
<p>Hope that helps. And thanks.</p>Achmed Tyrannus Albab2019-01-11T03:42:31ZRE: How do i change log file path ?Achmed Tyrannus Albabhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1119791422019-01-10T17:23:33Z2019-01-10T17:23:33Z<p>I did almost exactly like what you had suggested, except i left all
categories there,</p>
<p>and my path are Windows directory path. I even changed the slash just
in case that was the issue.</p>
<p>But all all fails and log is still created at the same directory and
none created at C drive.</p>
<p>Below is my xml :<br />
<br /> </p>
<pre>
<?xml version="1.0"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="FILE" class="org.apache.log4j.rolling.RollingFileAppender">
<rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
<param name="FileNamePattern" value="C:/TestingLogLOCATION/liferay@spi.id@.%d{yyyy-MM-dd}.log" />
</rollingPolicy>
<layout class="org.apache.log4j.EnhancedPatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}:%L] %m%n" />
</layout>
</appender>
<root>
<priority value="INFO" />
<appender-ref ref="FILE" />
</root>
</log4j:configuration></pre>Achmed Tyrannus Albab2019-01-10T17:23:33ZRE: How do i change log file path ?Alfonso Criscihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1119771352019-01-10T13:50:02Z2019-01-10T13:50:02Z<html><head></head><body><p>Hi,</p>
<p> </p>
<p>This should be controllable through <strong>portal-log4j.xml</strong>
from [Liferay WAR]/WEB-INF/lib/portal-impl.jar\].</p>
<p> </p>
<p>To override it in a clean way:</p>
<p> </p>
<ol>
<li>Unzip the
files <code>log4j.dtd</code> and <code>portal-log4j.xml</code> from <code>[Liferay WAR]/WEB-INF/lib/portal-impl.jar</code></li>
<li>Move <code>log4j.dtd</code> and <code>portal-log4j.xml</code> to <code>[Liferay WAR]/WEB-INF/classes/META-INF</code></li>
<li>Rename <code>portal-log4j.xml</code> to <code>portal-log4j-ext.xml</code></li>
<li>Edit <code>portal-log4j-ext.xml</code> and delete all
the <em>category</em> tags and keep only the needed tags, like the
example below:</li></ol>
<p> </p>
<pre>
<?xml version="1.0"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="FILE" class="org.apache.log4j.rolling.RollingFileAppender">
<rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
<param name="FileNamePattern" value="@liferay.home@/logs/liferay@spi.id@.%d{yyyy-MM-dd}.log" />
</rollingPolicy>
<layout class="org.apache.log4j.EnhancedPatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}:%L] %m%n" />
</layout>
</appender>
<root>
<priority value="INFO" />
<appender-ref ref="FILE" />
</root>
</log4j:configuration></pre>
<div>
<p> </p>
<p>In the <em>param</em> tag that contains: </p>
<p>
<code>value="$liferay.home/logs/liferay@spi.id@.%d{yyyy-MM-dd}.log"</code>,
you must change $<em>liferay.home/logs/liferay</em> to the path
where you want the logs to be created. See the following example:</p>
<p> </p>
<p>
<code>value="/var/logs/liferay@spi.id@.%d{yyyy-MM-dd}.log"</code>
<em></em></p>
<p> </p>
<p>Please be aware, the <code>[LIFERAY_HOME]/logs</code> files will
still be created but will be empty files and not contain any data. </p></div>
</body></html>Alfonso Crisci2019-01-10T13:50:02ZHow do i change log file path ?Achmed Tyrannus Albabhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1119753752019-01-10T09:52:45Z2019-01-10T09:52:45Z<p>Hi, </p>
<p>I am trying to find a way to change my liferay log path from :</p>
<p>
<strong>D:\liferay-portal-6.2-ce-ga6\logs </strong>to <strong>E:\logs</