This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX: logging with file handler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "NX: logging with file handler" Watch "NX: logging with file handler" New topic
Author

NX: logging with file handler

Simon Ingram
Ranch Hand

Joined: Nov 30, 2003
Posts: 171
Hi folks again,
I am using the following logging.properties file, which as you can see assigns a file handler. Unfortunately for me, although I get console messages with this file, I don�t get the same messages in the logging file URLy.log. I do other junk in URLy.log but these are not related to my project or the messages on the console!

# To also add the FileHandler, use the following line instead.
handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
.level= ALL

# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = /Java/CERT/log/URLy.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
#java.util.logging.FileHandler.level = FINEST
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
#java.util.logging.XMLFormatter
# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

Scanning the posts on this forum, I have seen strange and wonderful things in the FileHandler.pattern i.e. %h/java%u.log which I guess creates a logger recipient file called u.log in the home directory/java, but what is %t\urlyBirdServer\%u.log? I am assuming that my ignorance of these matters could account for the missing messages. I also can�t figure out where the messages that do appear in URLy.log are coming from.
Any ideas on this would be appreciated. It's amazing that something as simple as logging should turn into such a headache!
regards
Simon
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NX: logging with file handler
 
Similar Threads
NX: which logging file?
RAD6/WAS6 Logging config..
Error in setting SecureRMIClientSocketFactory
Use of JDK1.4 logging
java.util.Logging configuration...