Results 1 to 3 of 3
- 03-09-2010, 07:10 AM #1
Member
- Join Date
- Oct 2009
- Posts
- 31
- Rep Power
- 0
Weird error with FileHandler, java.util.logging.FileHandler
I am trying to enable logging logging for my application but it cant start because of this error
The section of code with which i am trying to enable the logging isJava Code:Exception in thread "main" java.lang.IllegalArgumentException at java.util.logging.FileHandler.<init>(Unknown Source) at eAdmin.EstudentAdministration.initializeProperties(EstudentAdministration.java:311) at eAdmin.EstudentAdministration.main(EstudentAdministration.java:269)
Java Code:*/ public static void main(String[] args) { if(args == null || args.length != 1) { showUsage(); System.exit(1); } /* * SOME WEIRD ERROR HERE!!!! */ Properties props = new Properties(); try { InputStream inputStream = new FileInputStream(args[0]); props.load(inputStream); } catch(IOException ioe) { ioe.printStackTrace(System.err); } // Initialize the properties/configurations initializeProperties(props); BasicConfigurator.configure(); EstudentAdministration eAdmin = new EstudentAdministration(); eAdmin.show(); } private static void initializeProperties(Properties _props) { try { logFile = _props.getProperty("LOG_FILE", DEFAULT_LOG_FILE); FileHandler logFileHandler = new FileHandler(logFile); eAdminLOG.addHandler(logFileHandler); } catch(IOException ioe) { ioe.printStackTrace(System.err); } }
- 03-09-2010, 07:41 AM #2
Member
- Join Date
- Mar 2010
- Posts
- 8
- Rep Power
- 0
Either u have empty entry in the property file or u have no entry in the property file and DEFAULT_LOG_FILE is empty
- 03-09-2010, 08:18 AM #3
Member
- Join Date
- Oct 2009
- Posts
- 31
- Rep Power
- 0
Similar Threads
-
Jre upgrade Issue :java.util.zip.ZipException: error in opening zip file
By selvakumar.velmurugesan in forum New To JavaReplies: 0Last Post: 10-27-2009, 05:20 AM -
Java logging - log file location for FileHandler
By kfir.wolfson@gmail.com in forum Advanced JavaReplies: 2Last Post: 03-24-2009, 08:22 AM -
java.util.logging.StreamHandler memory leak?
By toadaly in forum Advanced JavaReplies: 1Last Post: 02-23-2009, 02:46 PM -
Weird Error?
By sciguy77 in forum New To JavaReplies: 4Last Post: 01-20-2009, 02:32 AM -
java.util.UnknownFormatConversionException error
By rosh72851 in forum Advanced JavaReplies: 7Last Post: 10-09-2008, 04:15 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks