Skip to content

refactor: factor out env-filter as logforth-filter-rustlog#231

Merged
tisonkun merged 5 commits into
mainfrom
factor-out-env-filter
Jun 2, 2026
Merged

refactor: factor out env-filter as logforth-filter-rustlog#231
tisonkun merged 5 commits into
mainfrom
factor-out-env-filter

Conversation

@tisonkun
Copy link
Copy Markdown
Contributor

@tisonkun tisonkun commented Jun 2, 2026

This closes #230

tisonkun added 4 commits June 2, 2026 08:56
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses #230 by extracting the env_filter implementation out of logforth-core into a dedicated filter crate (logforth-filter-rustlog), updating Logforth’s public surface and examples to use the new filter crate and naming.

Changes:

  • Introduces the new logforth-filter-rustlog crate and wires it into the workspace and logforth feature set (filter-rustlog).
  • Removes env_filter from logforth-core and updates starters/examples to use RustLogFilter/RustLogFilterBuilder.
  • Renames the log bridge type from LogAdapter to LogBridge and updates call sites.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Cargo.toml Adds filters/* to workspace members and registers logforth-filter-rustlog as a workspace dependency.
CHANGELOG.md Documents the env-filter extraction/rename under breaking changes.
core/src/filter/mod.rs Removes env_filter module and EnvFilter re-export from logforth-core.
core/Cargo.toml Removes now-unused dev dependency entries related to the moved filter tests.
filters/rustlog/Cargo.toml Adds new crate manifest for logforth-filter-rustlog.
filters/rustlog/README.md Updates crate README header for the extracted filter crate.
filters/rustlog/src/lib.rs Implements/renames filter API to RustLogFilter + builder and switches to logforth-core types.
filters/rustlog/src/tests.rs Updates tests to the extracted crate and renamed types.
logforth/Cargo.toml Adds filter-rustlog feature and includes it in starter-log.
logforth/src/lib.rs Re-exports the new filter crate behind the filter-rustlog feature.
logforth/src/starter_log.rs Updates starter defaults to use RustLogFilterBuilder and renames LogAdapter usage to LogBridge.
bridges/log/src/lib.rs Renames the public bridge type to LogBridge.
examples/Cargo.toml Adds a passthrough feature for filter-rustlog.
examples/src/asynchronous.rs Updates example to use LogBridge.
examples/src/log_with_logger.rs Updates example to use LogBridge.
examples/src/per_module_log_levels.rs Updates example to use RustLogFilterBuilder.
examples/src/per_module_with_ctor.rs Updates example helper to build a RustLogFilter via RustLogFilterBuilder.
Comments suppressed due to low confidence (3)

filters/rustlog/src/lib.rs:43

  • Minor grammar in crate-level docs: "most common used" should be "most commonly used".
    filters/rustlog/src/lib.rs:159
  • Grammatically, this should be "a [RustLogFilter]" (not "an").
    filters/rustlog/src/lib.rs:318
  • Grammatically, this should be "a [RustLogFilter]" (not "an").

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bridges/log/src/lib.rs
Comment thread logforth/src/starter_log.rs Outdated
Comment thread logforth/src/starter_log.rs Outdated
Comment thread logforth/src/starter_log.rs Outdated
Comment thread filters/rustlog/Cargo.toml
Comment thread CHANGELOG.md
Signed-off-by: tison <wander4096@gmail.com>
Copy link
Copy Markdown

@ariesdevil ariesdevil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@tisonkun tisonkun merged commit 87c7089 into main Jun 2, 2026
10 checks passed
@tisonkun tisonkun deleted the factor-out-env-filter branch June 2, 2026 14:55
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.

Factor out env_filter to a dedicated crate

3 participants