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

Verbose logging for TUI #11

Closed
orhun opened this issue Apr 16, 2022 · 6 comments · Fixed by #83
Closed

Verbose logging for TUI #11

orhun opened this issue Apr 16, 2022 · 6 comments · Fixed by #83
Assignees
Labels
enhancement New feature or request

Comments

@orhun
Copy link
Owner

orhun commented Apr 16, 2022

Is your feature request related to a problem? Please describe.
Printing to stdout is not possible while running TUI since the output is locked by the terminal backend (termion). This causes verbose logging to be suppressed.

Describe the solution you'd like
Add a new command-line flag named --verbose and somehow enable verbose logging while running the TUI.

Describe alternatives you've considered
-

Additional context
This will be useful when some of the parameters cannot be retrieved due to insufficient permissions and error logs are printed. Right now there is no way of telling when the parameter list is fetched without errors when the TUI is launched.

@orhun orhun added the enhancement New feature or request label Apr 16, 2022
@orhun orhun self-assigned this Apr 16, 2022
@koutheir
Copy link

koutheir commented Jan 2, 2023

Logging to the terminal when a TUI is rendered might cause rendering issues. Have you considered the following alternatives:

  • Logging to a log file.
  • Logging to the syslog.
  • Tearing down the TUI right before printing to stderr.

@orhun
Copy link
Owner Author

orhun commented Jan 28, 2023

Thank you for the ideas @koutheir!

Another alternative would be using tui-logger.

@koutheir
Copy link

Logging inside TUI would make the logs unavailable for further analysis at a later date, which is a very common use case for logs.

@orhun
Copy link
Owner Author

orhun commented Apr 15, 2023

What do you suggest here? @koutheir

@koutheir
Copy link

I suggest saving the log entries to a log file that can be analyzed after the fact.

@orhun orhun mentioned this issue Apr 21, 2023
16 tasks
@orhun
Copy link
Owner Author

orhun commented Apr 21, 2023

tui-logger supports saving the logs to a file and also provides a smart widget for analyzing them. I implemented a draft at #83

@orhun orhun closed this as completed in #83 Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants