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

Ensure correct filename is displayed in Start/Stop messages #69

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

Conversation

pahindman
Copy link

When starting logging it was possible for the filename displayed to be different than the actual filename used (though probably at most off by 1 second). More importantly, when stopping logging the filename displayed would be constructed at the time that logging was stopped, so would almost never be correct. This PR fixes both by repurposing the pane-specific logging_variable to hold the filename being logged to.

Phil Hindman added 2 commits May 18, 2024 11:42
Previously the filename was calculated twice: first when opening the
file, and then when displaying the message.  There is a small chance
that the time would change between those two events, causing the
displayed filename to be incorrect.  This change calculates the name
once and then uses that name in both places.
@pahindman pahindman force-pushed the fix_stop_logging_message branch from a68ee0a to 5085290 Compare May 18, 2024 16:42
@pahindman pahindman force-pushed the fix_stop_logging_message branch from 5085290 to 23dc333 Compare September 28, 2024 16:43
Phil Hindman added 4 commits September 28, 2024 13:05
Use a pane option variable, and remove unnecessary script variables.
Set it in start_pipe_pane, unset it in stop_pipe_pane, and determine
whether logging is on by whether it is set or unset.
Since the string stored in @logging-variable can be arbitrary, let's
store the filename there, so that we can display the correct name when
we stop logging.
The name of the file that the current pane is logging to is stored in
the variable, so name it (and the helper functions) accordingly.
@pahindman pahindman force-pushed the fix_stop_logging_message branch from 23dc333 to 5f03ad0 Compare September 28, 2024 21:47
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.

1 participant