Skip to content
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

Save scrollback and start logging as single function #39

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bedge
Copy link

@bedge bedge commented May 25, 2019

Fixes #31

Note that a cleaner solution may be to restructure the toggle/start scripts so that the block I added didn't need to replicate the context read that already exists in the toggle script.

@bedge
Copy link
Author

bedge commented May 25, 2019

Updated PR to fix #38 as well

@bedge
Copy link
Author

bedge commented May 25, 2019

OK, got carried away. Added README updates, and key bindings for the snapshot_and_log.
Hope this fits with your plans.

scripts/start_logging.sh Show resolved Hide resolved
scripts/start_logging.sh Show resolved Hide resolved
@bedge
Copy link
Author

bedge commented Aug 13, 2019

Can I get a review on this?
Been working splendidly for me:

Enabling shows this on the statusline:

History saved and logging started to /Users/bedge/log/tmux/2019-08-13/deng-2.log

Lets you "forget" to enable logging for an important thing, then go back and log the whole scrollback buffer and start logging everything after that.

@bedge bedge changed the title Let start_logging be called directly. Save scrollback and start logging as single function Aug 13, 2019
@codydiehl
Copy link

codydiehl commented Jun 7, 2020

Is there a way to stop the logging once it has began using the snapshot_and_log.sh ?
seems the toggle_logging.sh simply starts a new logging session when this is already logging the current pane.

I think it might be good to integrate an additional stop function. While not a necessity it would be full featured to do so.

Looks like would need to track whether we are already logging with a similar yet new function to the is_logging() found in the toggle_logging.sh script and then the function to turn it off by simply running the script again in the same pane that it was already started within.

I will take a look if i can get some time, but wanted to post here to see if there was something I was missing before trying to implement it myself.

@bedge
Copy link
Author

bedge commented Jun 7, 2020

@codydiehl, I agree completely.
This PR was a quick hack to add a missing toggle. I expect there's more than one case it's missing.
Glad to see it's getting a second look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tmux-logging/scripts/start_logging.sh in bashrc not working
2 participants