Wolfeman, On 10/8/20 10:33, Wolfeman wrote: > Hi, > I am trying to debug some requests coming into an application we have > running on tomcat. I was hoping to be able to print all of the request data > specifically post data to a debug file and this seemed like a good > solution. However I have followed the tomcat documentation for tomcat 7 and > tomcat 8, which is basically the same. > > I added the following to logging.properties > handlers = 1catalina.org.apache.juli.AsyncFileHandler, > 2localhost.org.apache.juli.AsyncFileHandler, > 3manager.org.apache.juli.AsyncFileHandler, > 4host-manager.org.apache.juli.AsyncFileHandler, > java.util.logging.ConsoleHandler, > 5request-dumper.org.apache.juli.FileHandler > > # To this configuration >elow, 1request-dumper.org.apache.juli.FileHandler > # also -eeds to be added to the handlers property near the top of the file > 5request-dumper.org.apache.juli.FileHandler.level = INFO > 5request-dumper.org.apache.juli.FileHandler.directory = > ${catalina.base}/logs > 5request-dumper.org.apache.juli.FileHandler.prefix = request-dumper. > 5request-dumper.org.apache.juli.FileHandler.encoding = UTF-8 > 5request-dumper.org.apache.juli.FileHandler.formatter = > org.apache.juli.VerbatimFormatter > > org.apache.catalina.filters.RequestDumperFilter.level = INFO > org.apache.catalina.filters.RequestDumperFilter.handlers = > 5request-dumper.org.apache.juli.FileHandler > > And I added this to the both the web.xml in the conf directory and the > web.xml in my application. I tried one, the other and both at the same time.
Definitely remove everything you added from conf/web.xml. That will be a disaster. > <filter> > <filter-name>requestdumper</filter-name> > <filter-class> > org.apache.catalina.filters.RequestDumperFilter > </filter-class> > </filter> > <filter-mapping> > <filter-name>requestdumper</filter-name> > <url-pattern>*</url-pattern> > </filter-mapping> > > > When I start tomcat it creates the log file, however nothing ever gets > printed in it. So it isn't working. I must be missing something. Is this > the right way to do this? What if you use "/*" as your url-pattern instead of "*"? -chris --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org