aspose file tools*
The moose likes Beginning Java and the fly likes Facing a problem with java.util.logging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Facing a problem with java.util.logging" Watch "Facing a problem with java.util.logging" New topic
Author

Facing a problem with java.util.logging

Nag raja
Greenhorn

Joined: Jan 25, 2010
Posts: 5
Hi,
I'm using java.util.logging to log my statemets. Here i'm using only FileHandler.No where i'm using ConsoleHandler, eventhough the logged stements are appearing both on the file and on the console.
I dont want console output. I only want File outout.
I tried with the follwing code but it's throwing ArrayIndexOutofBoundsException



Please help me at this context.
thanks
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

From the javadoc ArrayIndexOutofBoundsException
Thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array.

So apparently the array is empty.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Nag raja
Greenhorn

Joined: Jan 25, 2010
Posts: 5
Then please suggest me how can i terminate the output to Console?
Nag raja
Greenhorn

Joined: Jan 25, 2010
Posts: 5
Hi,
Finally i got the solution by looking into the logging API

The method i used is setUseParentHandlers(false);

Finally it stops sending output to console and now i'm seeing output in File only.

Thanks friends

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Facing a problem with java.util.logging