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

:log-open opens the current log file as specified by --log #6635

Conversation

fherenius
Copy link

@fherenius fherenius commented Apr 6, 2023

MR should fix the issue mentioned in #6469.

I used a similar implementation to CONFIG_FILE. Tests should still be added but I'll ensure people agree on the implementation first.

Fixes #6469

Copy link
Contributor

@pickfire pickfire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we really need a static variable just to do this since we can just pass the config around, but since I saw config file is like that we can keep it like this too. But I will let others to merge this.

@@ -26,6 +28,11 @@ pub fn initialize_config_file(specified_file: Option<PathBuf>) {
CONFIG_FILE.set(config_file).ok();
}

pub fn initialize_log_file(specified_file: PathBuf) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like initialize_config_file, this can take an Option<PathBuf> and we can move the directory creation (from here) into that block. That way we don't create the cache_dir unless we use it

@pascalkuthe pascalkuthe added C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 14, 2023
@pascalkuthe
Copy link
Member

This PR is no unnecessary as the issue it adrwssed was solved by #7573, regardless thank you for your contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

:log-open does not respect --log flag
4 participants