Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

System.err.println()  RSS feed

 
kri shan
Ranch Hand
Posts: 1489
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System.err.println("Testing");
Where this information is printed, whether in the console (or) file ??
 
Chris Wagnor
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The response of System.err.println(); is printed on the console as an error message.
Remember all the errors you get while running a class..??? like NullPointerException etc?
 
kri shan
Ranch Hand
Posts: 1489
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to write these message into one txt file. without using PrintWriter.
 
Lionel Badiou
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Yoy may find useful to take a look at the Java Loogging API.

Hope that helps,
 
James Carman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kri shan:
Is it possible to write these message into one txt file. without using PrintWriter.


Sure, try redirecting standard error when you run your program. You can easily do it in Windows or UNIX or pure Java.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!