<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Change logs path in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/change-logs-path/m-p/137736#M36947</link>
    <description>&lt;P&gt;Sorry, I confused my two project. I use SDK 4.1 to build ACS6.x.&lt;/P&gt;&lt;P&gt;I will try your suggestions.&lt;/P&gt;&lt;P&gt;Thanks! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Sep 2021 07:42:39 GMT</pubDate>
    <dc:creator>gsardisco</dc:creator>
    <dc:date>2021-09-14T07:42:39Z</dc:date>
    <item>
      <title>Change logs path</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/change-logs-path/m-p/137734#M36945</link>
      <description>&lt;P&gt;I need some help to customize path for alfresco.log and share.log&lt;/P&gt;&lt;P&gt;I built alfresco 6.1 community with SDK 3.1 and deployed on Tomcat 8.5.&lt;/P&gt;&lt;P&gt;Share and Alfresco logging in tomcat root path:&lt;BR /&gt;&amp;lt;tomcat_home&amp;gt;/alfresco.log&lt;BR /&gt;&amp;lt;tomcat_home&amp;gt;/share.log&lt;/P&gt;&lt;P&gt;I want log files only under:&lt;BR /&gt;&amp;lt;tomcat_home&amp;gt;/logs/alfresco.log&lt;BR /&gt;&amp;lt;tomcat_home&amp;gt;/logs/share.log&lt;BR /&gt;and rolling, of course.&lt;/P&gt;&lt;P&gt;I tried to add to copy&amp;nbsp;&lt;BR /&gt;&amp;lt;tomcat_home&amp;gt;/webapps/alfresco/WEB-INF/classes/log4j.properties&lt;BR /&gt;&amp;nbsp;under&lt;BR /&gt;&amp;lt;tomcat_home&amp;gt;/shared/classes/alfresco/extension/custom-log4j.properties with:&lt;BR /&gt;log4j.appender.File.File=./logs/alfresco.log&lt;/P&gt;&lt;P&gt;This configuration created alfresco.log on startup, logging only "Ignoring script patch" and finally log under &amp;lt;tomcat_home&amp;gt;./logs&lt;/P&gt;&lt;P&gt;The best result (without initial log "Ignoring script patch"), if I run ../bin/startup.sh under &amp;lt;tomcat_home&amp;gt;./logs (I didn't understand this behavior)&lt;/P&gt;&lt;P&gt;What is the best way to configure alfresco.log? I think to add custom-log4j.properties, isn't it?&lt;BR /&gt;&lt;BR /&gt;But, how to configure log path for share? Can I add configuration in SDK? Where?&lt;/P&gt;&lt;P&gt;Can you help me?&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 15:44:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/change-logs-path/m-p/137734#M36945</guid>
      <dc:creator>gsardisco</dc:creator>
      <dc:date>2021-09-13T15:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Change logs path</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/change-logs-path/m-p/137735#M36946</link>
      <description>&lt;P&gt;Are you using sdk 4.x or 3.x? For ACS6.x you should be using the sdk4.1&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create custom log file for alfresco, check this thread:&amp;nbsp;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/logs-file-in-sdk-4-1/m-p/301710#M21137" target="_blank" rel="noopener nofollow noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-forum/logs-file-in-sdk-4-1/m-p/301710#M21137&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Custom log4j may not work for share so additionally, y&lt;A href="https://github.com/Alfresco/alfresco-community-repo/blob/master/packaging/war/src/main/resources/log4j.properties#L16" target="_self" rel="nofollow noopener noreferrer"&gt;ou can update the war files to have paths&lt;/A&gt; as "logs/alfresco.log, logs/share.log"&lt;/P&gt;
&lt;P&gt;e.g:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;./tomcat/webapps/share/WEB-INF/classes/log4j.properties:log4j.appender.File.File=logs/share.log&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;./tomcat/webapps/alfresco/WEB-INF/classes/log4j.properties:log4j.appender.File.File=logs/alfresco.log&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you are using sdk3.1 (which i have not tested to use it for ACS6.x), you can do ovelaying to update the war files (alfresco.war, share.war) with updated appender file paths. Checkout this thread for more on overlaying :&amp;nbsp;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/trying-to-generate-war-for-alfresco-and-share-using-sdk4/m-p/301895#M21268" target="_blank" rel="noopener nofollow noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-forum/trying-to-generate-war-for-alfresco-and-share-using-sdk4/m-p/301895#M21268&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;If you are using SDK4.1 and docker, you can update the &amp;lt;yourcustomRepoModule&amp;gt;-platform-docker/src/main/docker/DockerFile to have following steps :&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;PRE&gt;RUN sed -i "s|log4j.appender.File.File\=alfresco.log|log4j.appender.File.File\=&lt;STRONG&gt;logs/alfresco.log&lt;/STRONG&gt; |g" $TOMCAT_DIR/webapps/alfresco/WEB-INF/classes/log4j.properties ;
&lt;/PRE&gt;
&lt;P&gt;example:&lt;/P&gt;
&lt;PRE&gt;FROM ${docker.acs.image}:${alfresco.platform.version}

ARG TOMCAT_DIR=/usr/local/tomcat

USER root

# Copy Dockerfile to avoid an error if no JARs exist
COPY Dockerfile extensions/*.jar $TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/

# Copy Dockerfile to avoid an error if no AMPs exist
COPY Dockerfile extensions/*.amp $TOMCAT_DIR/amps/
RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
              $TOMCAT_DIR/amps $TOMCAT_DIR/webapps/alfresco -directory -nobackup -force
&lt;BR /&gt;&lt;STRONG&gt;RUN sed -i "s|log4j.appender.File.File\=alfresco.log|log4j.appender.File.File\=logs/alfresco.log |g" $TOMCAT_DIR/webapps/alfresco/WEB-INF/classes/log4j.properties ; &lt;/STRONG&gt;&lt;BR /&gt;
COPY alfresco-global.properties $TOMCAT_DIR/shared/classes/alfresco-global.properties
COPY dev-log4j.properties $TOMCAT_DIR/shared/classes/alfresco/extension
COPY disable-webscript-caching-context.xml $TOMCAT_DIR/shared/classes/alfresco/extension

# Copy Dockerfile to avoid an error if no license file exists
COPY Dockerfile license/*.* $TOMCAT_DIR/webapps/alfresco/WEB-INF/classes/alfresco/extension/license/

USER ${USERNAME}&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;for share, &amp;lt;yourcustomShareModule&amp;gt;-share-docker/src/main/docker/DockerFile:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;PRE&gt;FROM ${docker.share.image}:${alfresco.share.version}

ARG TOMCAT_DIR=/usr/local/tomcat

# Copy Dockerfile to avoid an error if no JARs exist
COPY Dockerfile extensions/*.jar $TOMCAT_DIR/webapps/share/WEB-INF/lib/

# Copy Dockerfile to avoid an error if no AMPs exist
COPY Dockerfile extensions/*.amp $TOMCAT_DIR/amps_share/
RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
              $TOMCAT_DIR/amps_share $TOMCAT_DIR/webapps/share -directory -nobackup -force

&lt;STRONG&gt;RUN sed -i "s|log4j.appender.File.File\=share.log|log4j.appender.File.File\=logs/share.log |g" $TOMCAT_DIR/webapps/share/WEB-INF/classes/log4j.properties ;
&lt;/STRONG&gt;
COPY share-config-custom.xml $TOMCAT_DIR/shared/classes/alfresco/web-extension

COPY log4j.properties $TOMCAT_DIR/webapps/share/WEB-INF/classes
COPY hotswap-agent.properties $TOMCAT_DIR/webapps/share/WEB-INF/classes&lt;/PRE&gt;
&lt;P&gt;This will build the custom image with &lt;A href="https://github.com/Alfresco/alfresco-community-repo/blob/master/packaging/war/src/main/resources/log4j.properties#L14" target="_self" rel="nofollow noopener noreferrer"&gt;updated log path&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 22:16:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/change-logs-path/m-p/137735#M36946</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2021-09-13T22:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Change logs path</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/change-logs-path/m-p/137736#M36947</link>
      <description>&lt;P&gt;Sorry, I confused my two project. I use SDK 4.1 to build ACS6.x.&lt;/P&gt;&lt;P&gt;I will try your suggestions.&lt;/P&gt;&lt;P&gt;Thanks! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:42:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/change-logs-path/m-p/137736#M36947</guid>
      <dc:creator>gsardisco</dc:creator>
      <dc:date>2021-09-14T07:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Change logs path</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/change-logs-path/m-p/137737#M36948</link>
      <description>&lt;P&gt;Great if you are using SDK4.1, try the DockerFile approach.&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/85005"&gt;@gsardisco&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 14:17:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/change-logs-path/m-p/137737#M36948</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2021-09-14T14:17:51Z</dc:date>
    </item>
  </channel>
</rss>

