-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging stops on detached session #27
Comments
This was misdiagnosed. It seems that the file is created when the logging start, but it is not written to until the logging is stopped. Is this intended behavior? Is there a limit to how much it will cache before writing or might it save millions of lines only to write them all out when the logging is stopped? Is this put onto disk or just kept in memory prior to being written to the file path exposed? |
The actual behavior observed now is that periodically the log file is updated with a batch of updates over some prior time. Maybe every few minutes or something. |
Seems like it has something to do with the behavior of Try the following: Note: This assumes your pane index starts at 1. If not, then first run
$ tmux pipe-pane -t your_session:test.1 -o "cat >> ~/tmux-pipe-pane--normal.log"
You'll now be able to see numbers printed in realtime. However, in the $ ansi_codes="(\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]|^M)"
$ tmux pipe-pane -t your_session:test.1 -o "cat | sed -r 's/$ansi_codes//g' >> ~/tmux-pipe-pane--with_sed.log" I found that things only get printed into the logfile ( Also, perhaps it's best if you change the title of this issue to reflect new findings. |
The logging seems to work fine—but only so long as the tmux pane is active. As soon as I detach the session the logs stop being generated. I assume this is not intended behavior?
Nothing unusual about my setup except accessing from root, which perhaps is throwing it off? Or is this not designed to continue to log on a detached session, and if so, how is it intended to be used?
Thanks
The text was updated successfully, but these errors were encountered: