Log Screen Output to a file
Im getting lots of error message output to my screen from one of my applications and want to save the errors to a log. Does anyone know of a command to do this?
I cant simply use the the >error.txt command because taht only seems to work with an input i give it. I need something that logs everything the screen is seeing! Thanks. |
Make sure you set the app to log as verbosely as possible, then run "script ~/filename" before you go work on your app. After exiting the script session clean up any control chars.
|
programs have three types of streams. Streams are input and output you give or get from the computer. Standard input(keyboard) standard output( stuff is show on the monitor) and standard error(also monitor). When you do this
program > file.txt what you are saying is "direct the output that would be come to the screen(stdout) to a file instead" You can't use the > to redirect standard error to a file, which is probably what you're getting. Instead to this program 2> file.txt make sure there are no spaces between the 2 and the > this means "directe the standard error(stderr) to a file instead of to the screen(which is the default)". If you just use program > file.txt then you would be directing the standard output to the file, which it's not what you want in this case |
The script command works...
Thanks!
|
All times are GMT -5. The time now is 07:07 AM. |