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

Fix debug dir on linux and disable logging by default #430

Merged
merged 3 commits into from
Jul 10, 2023

Conversation

nileshpatra
Copy link
Contributor

Closes: #429

This PR does two things:

  • Change log dir to ~/.local/state if XDG_STATE_HOME is unset which is as per the freedesktop guidelines
  • Disables logging by default
    • Gomuks keeps logging events, and the size of the debug log can quickly shoot up if there are any crashes. Unless the user wants, it is not a good idea to keep dumping logs by default. However, logging would work just fine if DEBUG=1 is passed.

Tested this on top of 0.3.0 gomuks release.

@nileshpatra
Copy link
Contributor Author

@tulir can I get a review on this, please?

@nileshpatra
Copy link
Contributor Author

This is now accepted into debian, see https://tracker.debian.org/news/1442864/accepted-gomuks-030-1-source-amd64-into-unstable/

Any action or even comment about this would be useful for us to move forward to put this into debian testing, and also backport into current stable.

Copy link
Owner

@tulir tulir left a comment

Choose a reason for hiding this comment

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

Might be better to handle it like all other configurable paths in main.go, but this is fine as an intermediate step.

Needs a few small tweaks though

debug/debug.go Outdated Show resolved Hide resolved
debug/debug.go Outdated Show resolved Hide resolved
@nileshpatra
Copy link
Contributor Author

I've done the changes asked -- could you check now?

@nileshpatra
Copy link
Contributor Author

Anything missing / any further review on this? If not, can this be merged?

@tulir tulir merged commit 09a9279 into tulir:master Jul 10, 2023
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.

Change the way of logging gomuks?
2 participants