Tools
Enable access logging
This article describes how to enable logging in Apache® Tomcat®.
First published date
Last published date
Overview
This article documents how to enable logging in Apache Tomcat and create a localhost_access_log.txt file. This feature is disabled by default.
Web Help Desk may overwrite the tomcat_server_template.xml file when you update the software. Apply the steps in this article after each update.
Product section
Resolution
- Log in to the Web Help Desk server as an administrator.
- Stop Web Help Desk using Stop and start Web Help Desk
- Navigate to <WebHelpDesk\conf.
- Open the tomcat_server_template.xml file in a text editor (such as Notepad).
- Locate and uncomment the following code:
className="org.apache.catalina.valves.AccessLogValve" directory="../../log" prefix="localhost_access_log" pattern="common" resolveHosts="false" />
The directory should be /log.
For additional detail, set the pattern parameter to combined. This value generates log that charting utilities (such as awstats) can understand. (© 2018 AWStats, available at awstats.sourceforge.io, obtained on June 10, 2019) - Start Web Help Desk using Stop and start Web Help Desk
- Navigate to <WebHelpDesk>\log,
This directory contains the localhost_access_log.txt file. Open the file in a text editor to view the logging.
Disclaimer: Please note, any content posted herein is provided as a suggestion or recommendation to you for your internal use. This is not part of the SolarWinds software or documentation that you purchased from SolarWinds, and the information set forth herein may come from third parties. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment. You elect to use third party content at your own risk, and you will be solely responsible for the incorporation of the same, if any.