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

feat(tui): improve logging #83

Merged
merged 18 commits into from
Apr 24, 2023
Merged

feat(tui): improve logging #83

merged 18 commits into from
Apr 24, 2023

Conversation

orhun
Copy link
Owner

@orhun orhun commented Apr 21, 2023

Description

This PR improves the logging by using the log crate for events and also adds logging for the TUI.

Motivation and Context

Closes #11

How Has This Been Tested?

Unit tests.

Screenshots / Logs (if applicable)

TBA.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Todos:

  • Add an argument for systeroid-tui for specifying the output file for logs
  • Add trace logs for systeroid-core
  • Possibly update the logger style for systeroid-tui
  • Update documentation about logging (RUST_LOG) and logger widget key bindings

@orhun orhun mentioned this pull request Apr 21, 2023
@codecov-commenter
Copy link

codecov-commenter commented Apr 22, 2023

Codecov Report

Patch coverage: 39.07% and project coverage change: -2.70 ⚠️

Comparison is base (80be6c5) 79.64% compared to head (448fde8) 76.94%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #83      +/-   ##
==========================================
- Coverage   79.64%   76.94%   -2.70%     
==========================================
  Files          23       23              
  Lines        1429     1500      +71     
==========================================
+ Hits         1138     1154      +16     
- Misses        291      346      +55     
Flag Coverage Δ
unit-tests 76.94% <39.07%> (-2.70%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
systeroid-tui/tests/integration_test.rs 100.00% <ø> (ø)
systeroid/src/main.rs 0.00% <0.00%> (ø)
systeroid-tui/src/command.rs 76.82% <11.77%> (-21.26%) ⬇️
systeroid/src/app.rs 62.61% <25.00%> (ø)
systeroid-tui/src/app.rs 63.45% <30.00%> (+0.08%) ⬆️
systeroid-tui/src/lib.rs 58.83% <46.16%> (-2.71%) ⬇️
systeroid-tui/src/ui.rs 76.68% <48.65%> (-6.48%) ⬇️
systeroid-core/src/config.rs 98.15% <66.67%> (-1.85%) ⬇️
systeroid-core/src/sysctl/controller.rs 77.23% <77.78%> (-0.89%) ⬇️
systeroid-core/src/sysctl/parameter.rs 90.22% <100.00%> (+0.11%) ⬆️
... and 2 more

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@orhun orhun marked this pull request as ready for review April 24, 2023 19:54
@orhun orhun added the enhancement New feature or request label Apr 24, 2023
@orhun orhun changed the title Improve logging feat(tui): improve logging Apr 24, 2023
@orhun orhun merged commit 3ace964 into main Apr 24, 2023
@orhun orhun deleted the feat/improve_logging branch April 24, 2023 20:08
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 this pull request may close these issues.

Verbose logging for TUI
2 participants