Hey, I really need some help right now, trying to find a fucking error that keeps escaping...

Hey, I really need some help right now, trying to find a fucking error that keeps escaping, I keep only getting half the error because it's so large whenever I visit the screen. My VPS is running CentOS and I cannot for the life of me figure out how to fucking make it log the screen specifically, it says using Ctrl-A + H will start logging the screen but I get no message and I can't find the god damn log file. This is driving me nuts, I'm only using linux to save cash. Please, be merciful, help me. Happy new year.

bump hitler

Tell us more, when do you get the error? When you boot the machine? When you run some command? At random?

Almost all logfiles are located under /var/log directory and its sub-directories on Linux

Did you try dmesg?

No it's an error relating to the java program I'm running and basically I need to log the screen session so I can view it later and have the entire error. Is there anyway I can do this? Which folder would it be generated in? Is it perhaps possible to add a -log or something when I first start the session? I'm seriously lost...

I don't think dmesg would work because by the time I reconnect the screen only shows a portion I doubt it'll have the entire log, but I'll be sure to try it the next time I see a part of the error, thank you very much for your input.

bump

when you run it from the command line then write:

$ ./your-java-prog 2> filename.txt

when you run your-java-prog (what ever that is) then the error will be put into filename.txt

/var/log/messages

~/.bash_history

How do I open the command line on the screen?

...

What do you mean?

you can open the terminal in the menu or use ALT + F2 and type gnome-terminal as the command to run it.

See the image I posted, I'm in the screen where my java program is running but I can't open the command line to enter logger.txt, Can i do it from another screen by referencing the screen I need logged? Like
>screenid logger.txt

You need to do it BEFORE you run your java program... or in other words run your java program from the command line with the "2> filename.txt" command after it.

So just to triple check, it'd be like
>screen sh run.sh filename.txt
Correct?

No... But rather

>screen sh run.sh 2> filename.txt

tell me if this works

It works! Thank you so much, so so so much, so so so so so so so so so much! It created a text document and I suppose it'll start logging now. FINALLY!!! Is there any other info you think I should know about this logging method?

Also, will it only update the txt file when the screen is terminated?

I am pretty sure it will create a new file every time... If you want to ADD or in other words append to the file then you need to put "2>>" instead of "2>"

I think so, yes... I am not sure... I have only done this on small scripts that terminate fast .

So if I terminate it manually will it still log? Like if I run the command line (like this)
>screen -X -S screenId quit
as I usually do, it'll generate it? My program doesn't terminate automatically.

Are you using putty? Just log all output to a file

Yes, I am. How do I do that?

I am not sure to be honest. But it should save any error message to the file, and it's designed for software that don't behave properly. So should be fine to end it any way you want.

Right click and go to properties > logging > log everything to file
Something like that I'm on my phone right now

Alright, thank you both very much for your help. You really really really have made my night, I'm finally gonna go have some sleep, I hope you both have a great new year. Take care anons.

All the best xxx

You too!

I am sure next time it might be easier for you to ask on some IRC (maybe #linux or #centos on freenode).