I wanto to customize the logs in Alfresco (alfresco.log, share.log and solr.log) so I have created three new files in $TOMCAT_HOME\tomcat\shared\classes\alfresco\extension\:
And I have modified the line log4j.appender.File.File=XXXX.log in both of them to change the location of the log files.
However, although the new files have been created in the new location, Alfresco continues witting in the original log files.
What should I change in order to write in the new log files, and not in the original logs?
When you put that line in one of the files you have mentioned, you are actually NOT modifying / overriding the original definition, but are defining a new appender in the scope of that configuration file. For that appender to be used, you need to overide / reconfigure the root logger to actually use it in the same file. You also need to copy all other configurations concerning the "File" appender, since - again - you are not modifying the original definition but creating a new one, which needs to be complete to work properly.
Lastly: Out-of-the-box, there is no support for a share-log4j.properties configuration in the extension directory. There is actually no support for overridable / customizable logging in Share at all. This is why I have implemented this feature in one of my addons.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.