Log and Logging of Search Queries
One may turn on the logging of popular search queries as executed into a log file using log4j. This file may then be used to perform statistical reporting on the types of search queries executed.
Steps
To enable the logging of search queries:
- Open the file "$MM_HOME/tomcat/conf/log4j2.xml" in the installation folders.
- Change the lines near the end of the file:
<Logger name="search" level="off" additivity="false">
<AppenderRef ref="SEARCH"/>
</Logger>
to:
<Logger name="search" level="all" additivity="false">
<AppenderRef ref="SEARCH"/>
</Logger>
3. Restart the application server.
A search.log file can be found under the "$MM_HOME/data/logs/search" directory in the installation folders.
The log contains the following search query details: time, thread, username, context, text.
To disable the logging of search queries, simply change the lines back and restart.
REST API calls are logged in the catalina.log and only if Debug logging is enabled.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!