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

Gurk always creates a log file even if verbose is turned off #204

Closed
gjabell opened this issue Nov 21, 2022 · 2 comments · Fixed by #205
Closed

Gurk always creates a log file even if verbose is turned off #204

gjabell opened this issue Nov 21, 2022 · 2 comments · Fixed by #205

Comments

@gjabell
Copy link

gjabell commented Nov 21, 2022

When running gurk it seems to always create a gurk.log file in the current directory even when running without verbose mode (I guess that happens here: https://github.com/boxdot/gurk-rs/blob/master/src/main.rs#L51). Could a check be added to only create this file if the verbose mode is enabled, or better yet put it in a proper location like ~/.local/share/gurk?

@boxdot
Copy link
Owner

boxdot commented Nov 21, 2022

Accoding to xdg dirs logs should go into the state dir, however it is not available on MacOS/Windows. So, I am not entirely sure if it is a good idea to put logs in to the ~/.local/share/gurk. WDYT?

@gjabell
Copy link
Author

gjabell commented Nov 21, 2022

Thanks for the quick fix!

Accoding to xdg dirs logs should go into the state dir, however it is not available on MacOS/Windows. So, I am not entirely sure if it is a good idea to put logs in to the ~/.local/share/gurk. WDYT?

Good point! ~/.local/state/gurk would make more sense; I assume there are corresponding dirs on Mac/Windows too (on MacOS maybe it's ~/Application\ Support). But since it's a debug log it's probably fine to just leave it in the current directory since it's not being autocreated anymore :)

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 a pull request may close this issue.

2 participants