• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Logging  RSS feed

 
vignesh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a problem using java logging. I have currently set the handler to FileHandler to redirect all my logs to a log file. And in some cases I have to redirect that particular log to the java console. I couldn't able to do that even if I reset the handler to ConsoleHandler.
How do I manage to use two different handlers alternatively when required? That is sometimes I might require to redirect the log to java console and in some cases to a log file.
If anybody knows the solution please reply me.
I appreciate your time.
Thanks,
-- Vignesh.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Vignesh, welcome to JavaRanch!

Please check your private messages. You can see them by clicking "My Profile" at the top right of the page.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any reason why you cant use

and then use them?
 
Mike Anna
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hola Jesper,

I think it really helps if you post solutions in the forum.
There are so many people googling for a problem like this and so many of them being redirected here.. but eventually they dont find the solutions.
Dont you think it will do good to many people if you post reply in a forum
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it really helps if you post solutions in the forum.

Don't worry Mike, I don't think that Jasper sent the solution to the original poster. He wanted to warn him about his name which is not set properly (Naming Policy)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!