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

add option to disable debug.log #1066

Closed
mistersmee opened this issue Jul 5, 2021 · 6 comments · Fixed by #1122
Closed

add option to disable debug.log #1066

mistersmee opened this issue Jul 5, 2021 · 6 comments · Fixed by #1122
Milestone

Comments

@mistersmee
Copy link

Currently, debug.log is created wherever the current directory is, and if there are no errors, it is a 0B empty file, even if zulip-term is launched without the -d flag.

I would like the creation of debug.log to be tied to that -d flag, as it gets messy and annoying after a while, deleting that file again and again, i.e. if the debug flag is passed then use debug.log, else don't create it.

If not that, then at least an option to disable creating that file.

@neiljp
Copy link
Collaborator

neiljp commented Jul 6, 2021

@mistersmee While I mainly run this from the same directory I definitely can agree with you on this 👍
What version of ZT are you running?

We have a plan to move to using xdg directories which will help with this to some degree in future (#678).

However, independently of this plan, debug.log should have little output in most cases, so I'm going to see if there's a quick resolution to this where we don't create it until it's needed.

@mistersmee
Copy link
Author

mistersmee commented Jul 6, 2021

What version of ZT are you running?

Zulip Terminal 0.6.0

Installed using pip, so, not the git version.

We have a plan to move to using xdg directories which will help with this to some degree in future (#678).

That would be awesome! I currently have an alias that basically does the same thing, alias zul="zulip-term -c ~/.config/zulip-term/zuliprc", but having XDG support would make it so easier.

While I mainly run this from the same directory I definitely can agree with you on this

I mainly stay in ~ as well, but sometimes I'm working in a repo, and I need to check messages I may have received, and it gets created there, etc. etc.

However, independently of this plan, debug.log should have little output in most cases, so I'm going to see if there's a quick resolution to this where we don't create it until it's needed.

Sure, thanks! With that I'd say the issue is resolved, so I'll close it.

@neiljp
Copy link
Collaborator

neiljp commented Jul 6, 2021

@mistersmee Thanks for being proactive in closing this, but I'm going to reopen this for now to see if we can avoid outputting until we write to the file, like we do with other log-files, or until we have #678 resolved.

@neiljp neiljp reopened this Jul 6, 2021
@neiljp
Copy link
Collaborator

neiljp commented Jul 6, 2021

@mistersmee Just a note that we keep the git version fairly stable and there are some good new features there you might enjoy :)
If you have time to drop by #zulip-terminal on chat.zulip.org it'd be interesting to hear your experiences with ZT and Zulip in general!

neiljp added a commit to neiljp/zulip-terminal that referenced this issue Aug 17, 2021
neiljp added a commit to neiljp/zulip-terminal that referenced this issue Aug 17, 2021
neiljp added a commit to neiljp/zulip-terminal that referenced this issue Aug 21, 2021
To centralize the specification of the logging file, this is now set in
`run.py` and passed into the controller as an `Optional[str]` argument.

Tests amended.

Fixes zulip#1066.
neiljp added a commit that referenced this issue Aug 21, 2021
To centralize the specification of the logging file, this is now set in
`run.py` and passed into the controller as an `Optional[str]` argument.

Tests amended.

Fixes #1066.
@neiljp
Copy link
Collaborator

neiljp commented Aug 21, 2021

@mistersmee I'm sure you'll get a notification this is resolved (by #1122) and now only opens the file in debug mode.
However, note that for now this is in only the git version - though this is very easy to install before we make the next release.

@neiljp neiljp added this to the Next Release milestone Aug 21, 2021
@mistersmee
Copy link
Author

Pretty cool! This should help in keeping my homedir clean, thanks!

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