• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Facing a problem with java.util.logging

 
Nag raja
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Nag raja
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then please suggest me how can i terminate the output to Console?
 
Nag raja
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic