Customizing Log

Showing results for 
Search instead for 
Did you mean: 
Active Member

Customizing Log

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?

1 Reply

Re: Customizing Log

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 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.