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

Supress output if action is successful #1543

Closed
kwbr opened this issue Jul 22, 2022 · 5 comments · Fixed by #1561
Closed

Supress output if action is successful #1543

kwbr opened this issue Jul 22, 2022 · 5 comments · Fixed by #1561
Labels
enhancement New feature or request 📌 This can't go stale

Comments

@kwbr
Copy link

kwbr commented Jul 22, 2022

Feature Request

Provide an option to silence the output if operation is successful.

Use Case/Motivation

If everything has worked there is no need to print a 3 line graphical box that everything was written to my journal successfully. This is exactly what I would assume. I see this box 30 times a day and it does not provide useful information.

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓                                                                                                        
┃  Entry added to default journal  ┃                                  
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ 

Other information

Please provide either an option or a configuration switch to suppress that output.

@kwbr kwbr added 🆕 New! enhancement New feature or request labels Jul 22, 2022
@wren
Copy link
Member

wren commented Jul 30, 2022

Hi! Thanks for filing this issue. In the code, we recently added a way to easily handle different styles of output. This is where the boxes came from, but it can easily support other styles. So, we went with the graphical boxes as the default, but were considering adding a way to change the output that a user sees (probably in the config, but maybe some flag).

Would having a different style of output (like a more compact, 1-line format) address your concerns? Or would it still be more useful to have some way to have zero output on successful operations?

@wren wren added needs more info Further information is requested and removed 🆕 New! labels Jul 30, 2022
@kwbr
Copy link
Author

kwbr commented Aug 2, 2022

I would prefer no output for successful operations. This is known as the "Rule of Silence" (http://www.linfo.org/rule_of_silence.html).

@wren wren removed the needs more info Further information is requested label Aug 13, 2022
@micahellison
Copy link
Member

Thanks for the link, @kwbr. I like this notion. Just a few things we need to sort out:

What should be suppressed. This "Rule of Silence" piece presents a strong argument for suppressing this message for new entries. But what about edited entries? Especially when a timestamp is removed by the user, it can be a lot less clear as to what has happened to an entry. Maybe we would still want a list of entries added, deleted, and removed in that case. And also, are there any other messages that should perhaps be silenced by this?

How to set the verbosity level. Approaches:

  • Command-line argument like --verbose to see these messages
  • Config argument such as verbose, perhaps settable to "default" or "verbose"
  • Both of the above

What the default behavior should be. Rather than changing the default, it could be set to the current behavior, and instead of setting --verbose in the args and/or verbose in the config file, there could be a quiet argument/setting instead.

How this interacts with the current --debug flag. I don't see any major issues with this off the top of my head but wanted to raise the issue in case anyone has any thoughts about it.

Lastly, just to keep the links together: there's currently an open PR directly affected by these decisions #1524 and its functionality should reflect whatever we decide here.

@kwbr
Copy link
Author

kwbr commented Aug 15, 2022

The proposal sounds good to me. Setting the verbosity level in a backwards compatible way makes sense. A user, like me, that prefers no output could easily opt-in.

One thought: maybe let's start with the obvious things to suppress output. The example you brought up about complex edits and what to show the user in this case could be solved in a separate issue.

@micahellison
Copy link
Member

One thought: maybe let's start with the obvious things to suppress output. The example you brought up about complex edits and what to show the user in this case could be solved in a separate issue.

Thanks for this thought. That's a great point and I'm happy to move forward with this change rather than holding it up with all these other questions.

I put in a PR to suppress the message with one exception: it still displays the message if you're journaling to a non-default journal. I think that message is still useful in those cases, especially considering how "magic" jrnl is when it comes to identifying journals in what would otherwise look like journal entry content.

@micahellison micahellison added the 📌 This can't go stale label Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 📌 This can't go stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants