Global Directory
Global Directory
EXPLORE OUR SITES
London Stock Exchange Group
LSEG Data & Analytics
MyAccount
LSEG Perspectives
London Stock Exchange
FTSE Russell
LCH
Contact Us
Home
TR Internal
How do I turn on simple IIS style request logging in Tomcat
mtaylor
How do you turn on simple (local) request logging in tomcat (similar to the logging provided by default in IIS)?
Find more posts tagged with
logging
tomcat
refinitiv-internal
Accepted answers
mtaylor
If you want to log ALL requests, then putting the following in the context.xml file should do the trick.
This should log all requests to: $catalina_home/logs/request_log.txt.
If you want to log to a specific directory, you would add a directory=”xxx” attribute.
More specific info can be found [here][1]
[1]:
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html
All comments
mtaylor
If you want to log ALL requests, then putting the following in the context.xml file should do the trick.
This should log all requests to: $catalina_home/logs/request_log.txt.
If you want to log to a specific directory, you would add a directory=”xxx” attribute.
More specific info can be found [here][1]
[1]:
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html
Andrew Gerber
If you are working on Cobalt, all Java modules are configured with a Cobalt Infrastructure request logging filter, which outputs request/response information to a log file.
You can configure this with your `localdevelopment_[moduleName]-logging.xml` file (this file is usually under the `resources` classpath folder). Add the following `Appender` to your local logging file:
Then,
Add the following line to the `AsyncFile` appender:
This should output request logging files to the logging folder you selected using the `-DappLogDir` startup property. Note that I got this configuration from CMDB, as the logging config files which are deployed with the modules are stored in CMDB.
Scott gu
put the following into **server.xml** (under the *host* node):
as you can see, we use the shorthand pattern pattern="**combined**" to appends the values of the **Referer** and **User-Agent**(like Chrome, FF, IE ) to our log.
Quick Links
All Forums
Recent Questions
Terms of use
Privacy & Cookie Statement
Cookies settings
Do not sell my info
Whistleblowing
UK Bribery Act
Modern Slavery Act