File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
this week in the
Other JSE/JEE APIs
Java Logging: File not being 'rotated'
Joined: Mar 30, 2005
Sep 14, 2005 02:02:00
Facing trouble configuring
logging. Following is the logging config file:
handlers= java.util.logging.FileHandler adapter.level = INFO # Log file specific properties. #pattern - Name and location of the log file. java.util.logging.FileHandler.pattern = logs/AdapterBuilder%u.log #limit-max size of the log file in bytes java.util.logging.FileHandler.limit = 50000 #count-max files to keep java.util.logging.FileHandler.count = 2 #formatter- format of the log file - simple or xml #Change to java.util.logging.XMLFormatter for xml logs java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter #append - append to log file or overwrite every time java.util.logging.FileHandler.append = true
Whenever the file size reaches the maximum specified limit, ie, 50k, an Exception is thrown and neither is a new file being created, nor are any more logs written.
The Exception thrown is:
java.util.logging.ErrorManager: 4 java.io.FileNotFoundException: logs\AdapterBuilder0.log.0 (The system cannot fin d the path specified) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at java.util.logging.FileHandler.open(Unknown Source) at java.util.logging.FileHandler.rotate(Unknown Source) at java.util.logging.FileHandler.access$100(Unknown Source) at java.util.logging.FileHandler$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.FileHandler.publish(Unknown Source) at java.util.logging.Logger.log(Unknown Source) at java.util.logging.Logger.doLog(Unknown Source) at java.util.logging.Logger.log(Unknown Source) at java.util.logging.Logger.info(Unknown Source) at XMLBindingUtils.analyseFrameworkSectionForFrameworkElement(Unknown Source)
From the Exception I assume the logger cant find the file, meaning the path to the log file becomes weird. If this is the case, why does it work the first time??
I agree. Here's the link:
subject: Java Logging: File not being 'rotated'
Getting error while displaying tif image in applet through browser.
JNDI Port number issue while strating JBoss server 4.2.2.GA
Does anyone know what these error means?
Still need some help w/ IO and Data Conversion
My applet is not being seen in its jar anymore. Please help!
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015