Tech Support Forum banner
Not open for further replies.
1 - 1 of 1 Posts

· Registered
1 Posts
Discussion Starter · #1 ·
I'm using

private static final java.util.logging.Logger LOGGER = java.util.logging.Logger.getLogger(MyClass.class.getName());
LOGGER.log(Level.INFO, "log message);
style to log in my java web application.

I start tomcat 8.0.21 from startup.bat (project requirement) on windows 10. I can see all the logging in console window, including java.util.logging.Logger.log logging. But I can't see any java.util.logging.Logger.log logging in tomcat standard log files - %tomcat%/logs/catalina.2018-07-31.log and localhost.2018-07-31.log.

I can see all the tomcat logging, but not my web application logging. I need to track some problems with my web application on client machines in production, because I can't model such problems on my local computer.

I need to see my logging along with other tomcat logging in %tomcat%/logs/catalina.<current_date>.log. It would be better to to use tomcat logging configuration for all the projects. But using a per-project configuration is acceptable too. I have Googled the whole day, but all the recipes I found did not work for me.

Please don't offer to use log4j. Using java.util.logging is a project requirement. Here is my %tomcat%/conf/ file

handlers =,, java.util.logging.ConsoleHandler

.handlers =, java.util.logging.ConsoleHandler

.level = INFO = ALL = ${catalina.base}/logs = catalina. = ALL = ${catalina.base}/logs = localhost. = ALL = ${catalina.base}/logs = manager. = ALL = ${catalina.base}/logs = host-manager.

java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = ALL
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers =

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = ALL
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers =

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = ALL
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers =

mycompany.package1.level = ALL
mycompany.package2.level = ALL
utils.jaxws.level = ALL
1 - 1 of 1 Posts
Not open for further replies.