Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Grab all program console outputs  RSS feed

 
Persio Berberian
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem Solved guys =] Thanks

Hey guys, due some peoples with problem running my program, i decided make a system to get logs of console errors and send to me so i know whats happening.
I need know how i could grab to like a String the console outputs.
I know that i can take from Process but idk how get my own application Process instance just if i create a new one like Process p = Runtime.getRuntime.exec("anotherprogrambutmine.exe");
Also to send logs what would be better, email? socket connection? Write in a txt then send to ftp?
Thanks =] This looks like an awesome forum :p new here
 
Carey Brown
Saloon Keeper
Posts: 2536
33
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a logging library. Java comes with one but I prefer Log4j. Log4j allows the configuration of the output destination which is somewhat more flexible than that available with the built in logging.
 
Persio Berberian
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeh i've been looking at loggers but its used just when you know where happen problem and you wan't know if someone had this problem, in my case there's alot of possible problems so i want discover wheres these problems, thats why i think get program console outputs would be a good, even because i could know at what stage the error ocurred.

but i decided for now that ill use System.setErr();
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!