logging - Differences between Screenlog and Hardcopy on GNU Screen -


introduction

i'm new using gnu screen, , i'm using because don't want lose work if unexpectedly ssh connection closes, , because want keep logfile of every output printed on terminal (at least recent tracks)

for ssh stuff, guess ctrl+a d detach , screen -r or screen -r session_name re-attach session solve problems, i'm trying understand logging.

i found screenlog , hardcopy on this link, says:

hardcopy ctrl+a h writes out current display contents file hardcopy.n in window's default directory, n number of current window. either appends or overwrites file if exists, determined hardcopy_append command.

log ctrl+a h begins/ends logging of current window file screenlog.n in window's default directory, n number of current window. if no parameter given, logging state toggled. session log appended previous contents of file if exists. current contents , contents of scrollback history not included in session log. default off.


observed behavior

so, far understood , trying use them, after enabling screenlog, keeps logging write , outputs of terminal in file (which happens go $home me) including characters change color \033[1;31mm. if cat screenlog.0, crashes printing file indefinitely, ok, can open editor or in session...

as hardcopy, apparently doesn't keep tracking commands, nor colors of outputs, , don't know if takes few lines visible in terminal or happened on session, clarify me?

finally, i'm opening screen on terminator instead of classical terminal, , if open different screen sessions on different windows of terminator, logs go screenlog.0 or hardcopy.0. in case of screenlog, conflict process that's being output on other sessions or overwrite it? how can create different screenlog.n files , put them in directory other $home?


further considerations

just conclude, 1 recommended? sorry huge question, i'm trying write in way can useful clarify details of these logs i'm having hard time find in other places. feel free correct me if said wrong :)

hardcopy command not save character attributes (colors, bold etc.) but, '-h' argument saves contents of scrollback buffer.

destination directory hardcopy files can set via hardcopydir command; existing files not moved, , setting applies windows open , future ones; directory log files "window's default directory" -- can changed chdir command; applies current window , future ones.

log file name pattern can set via logfile command. screen's escape sequences should work in pattern; example, logfile screenlog.%y%m%d.%s.%n. however, hardcopy file name pattern hardcoded.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -