• Post Reply Bookmark Topic Watch Topic
  • New Topic

System.out.println  RSS feed

 
Vicky In
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

The java application I work on has thousands of System.out.println statements. Now I have to make all these S.o.p's execute only if a condition is true and restrict executing them if the condition is false.

I cannot put the check at all the places where S.o.p statement is written in the code. Can somebody suggest a way out where I can have one common method which I can replace it with all the S.o.p's in the application?

Any help would be appreciated.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
Bill Shirley
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First off, obviously more design should have gone into this case.

System.out is not a good option for logging.
System.out is not a scalable or desirable form of debugging.

That said, where the standard output goes is dependent on the environment - the OS. If you give us more information, we could help in more detail.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!