Skip to content

Support dmesg filtering options (--facility, --level, --since, and --until options).#167

Merged
cakebaker merged 22 commits intouutils:mainfrom
fuad1502:dmesg-filter
Dec 15, 2024
Merged

Support dmesg filtering options (--facility, --level, --since, and --until options).#167
cakebaker merged 22 commits intouutils:mainfrom
fuad1502:dmesg-filter

Conversation

@fuad1502
Copy link
Copy Markdown
Contributor

@fuad1502 fuad1502 commented Dec 9, 2024

This PR is a continuation of issue #14

I also implemented RecordIterator in this PR. The reasons are as follows:

  • It makes sense to use iterators while implementing filtering options.
  • Later, we need to support "online" reads, which is easier to implement with iterators. (see --follow and --follow-new options)
  • It "might" improve performance (e.g. eliminate multiple passes through the collection, no need to store intermediary results, potentially better optimized.)

To Do:

  • facility
  • level
  • since
  • until

@fuad1502 fuad1502 marked this pull request as ready for review December 12, 2024 06:40
Comment thread tests/by-util/test_dmesg.rs
Comment thread src/uu/dmesg/src/time_formatter.rs Outdated
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
Comment thread src/uu/dmesg/src/dmesg.rs Outdated
Comment thread src/uu/dmesg/src/dmesg.rs Outdated
Comment thread src/uu/dmesg/src/dmesg.rs Outdated
@cakebaker cakebaker merged commit 7c7809e into uutils:main Dec 15, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (f621687) to head (e6364af).
Report is 52 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #167   +/-   ##
===========================
===========================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cakebaker
Copy link
Copy Markdown
Contributor

Good work, 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 this pull request may close these issues.

2 participants