This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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

 
jQuery in Action, 2nd edition
 
subject: Facing a problem with java.util.logging