I've reviewed the documentation for Tomcat 8.5 logging

https://tomcat.apache.org/tomcat-8.5-doc/logging.html

as well as the generic java.util.logging documentation. However, I'm still 
having problems understanding and configuring logging for my web application 
that I've deployed to Tomcat 8.5.20 on a Linux CentOS 7 server.

Here's what I've tried and where I'm stalled:

- Edited the default logging.properties in the Tomcat conf directory. I added 
the package that I'm interested in capturing logging information. For example:
com.example.myapp.level = ALL
com.example.myapp.handlers = 1catalina.org.apache.juli.AsyncFileHandler

- I deployed my web application. It has a class in the package 
com.example.myapp that has a logger defined:
final static Logger log = 
Logger.getLogger(com.example.myapp.MyClass.class.getName());

which I then use to call the log APIs like this:
log.severe("severe test");

and

log.finer("finer test");

- The problem is my severe API call is logged but my finer API call isn't. 
Actually, even when I back out all of my changes to the logging.properties 
file, my severe API call is still logged.

- I'm sure that the logging.properties file I'm editing is being used because 
it's I've edited it in other ways to get results (i.e. commented in the 
org.apache.catalina.util.LifecycleBase.level = FINE line to see many FINE log 
statements and defined another handler which resulted in another log file being 
generated).

I'm struggling with getting any meaningful logging working for my web 
application.
I must be missing something simple so I'm hoping someone can point me in the 
right direction.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to