Go Back   Tech Support Forum > Design Forum > Web Serving and Management

User Tag List

tomcat 8.0x java.util.logging.Logger.log to file

This is a discussion on tomcat 8.0x java.util.logging.Logger.log to file within the Web Serving and Management forums, part of the Tech Support Forum category. I'm using Code: 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

Closed Thread
Thread Tools Search this Thread
Old 07-31-2018, 11:12 PM   #1
Registered Member
Join Date: Jul 2018
Posts: 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/logging.properties file

handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler

.level = INFO

1catalina.org.apache.juli.AsyncFileHandler.level = ALL
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.

2localhost.org.apache.juli.AsyncFileHandler.level = ALL
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.

3manager.org.apache.juli.AsyncFileHandler.level = ALL
3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.AsyncFileHandler.prefix = manager.

4host-manager.org.apache.juli.AsyncFileHandler.level = ALL
4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.AsyncFileHandler.prefix = 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 = 2localhost.org.apache.juli.AsyncFileHandler

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

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

mycompany.package1.level = ALL
mycompany.package2.level = ALL
utils.jaxws.level = ALL
everdelightedon is offline  
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
windows 10 acting very strange
Hi folks. been having very bad navigation and page loading issues, with websites timing out all over the place ? passwords are all of a sudden gone, or not working. i had to reset nearly every webpage i visit. this site was particularly difficult. all of this started about the same time...
tcseacliff Windows 10 Support 56 04-24-2018 04:30 PM
[SOLVED] Unable to install Win 7 Service Pack 1 (Error 0x80070005)
So I'm trying to install Windows 7 Service Pack 1 (64 Bit) But I'm getting the error 0x80070005. The only AV software I'm using currently is MSE. CBS.log is too large of a file to upload and too many characters to include in this post so I've uploaded it to Dropbox. Link:...
doughboy256 Windows 7 , Windows Vista Support 118 08-19-2015 02:42 PM
Internet Explorer stops responding or runs slow
I have an older laptop with an Intel processor and 4GB of RAM running Vista. I am having issues which seem mainly to be in Internet Explorer and to a lesser extent in other programs as well. There are times when going into Windwos Mail that I get a message at the top of the page that says not...
jackdup Resolved HJT Threads 61 01-03-2015 03:15 PM
[SOLVED] help!!!! guy gone crazy with bluscreans!!!:@:@
i have an intel dh55hc motherboard in my pc i built my pc during summertime and at that time i got the patriot ram ... the whole stock had problems .. (they work with onestick bt the pc wont boot with 2 sticks) so i had a stick of 2gigs of that ram .. then i upgraded it with a kingston ram ..and...
avok95 Motherboards, Bios & CPU 21 11-17-2013 06:14 AM
Suspicious phone call
So a guy called me up saying that my computer was messed up beyond all recognition and convinced me it was being hacked. He directed me to his companies site: hxxp://www.microteckon.com Computer Repair Service, Virus Removal, Online PC Suppor. Help Services 24/7 - pckariger.com and I...
Fray32 Resolved HJT Threads 5 10-06-2011 03:54 AM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is on
Smilies are on
[IMG] code is on
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Post a Question

» Site Navigation
 > FAQ
Powered by vBadvanced CMPS v3.2.3

All times are GMT -7. The time now is 06:36 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.1.0 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright 2001 - 2018, Tech Support Forum

Windows 10 - Windows 7 - Windows XP - Windows Vista - Trojan Removal - Spyware Removal - Virus Removal - Networking - Security - Top Web Hosts