Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Application code currently needs to construct records manually or go through
logto emit Logforth events. This adds an explicit-logger native facade over the existing record, value, and dispatch APIs.log!accepts every native level;trace!throughfatal!provide the same field-map and message syntax. Macros borrow the logger and fields, evaluate expressions once, and prefilter before evaluating event data. Full-record filtering still runs; formatters may consume the same event more than once.Fromconversions into the existingkv::Value, with no new conversion trait. Scalars preserve their value kinds, strings and existing values are borrowed, andValue::display/debug,Value::list/map, andValue::nonecover explicit text, nested data, and absence.RecordBuilderand thelogbridge.Arc<Logger>. The optional bridge can use the same logger. Flush stays explicit;fatal!does not terminate or flush.This PR deliberately stops at native event construction. It adds no logger name, logger-bound context, field merging precedence, or context propagation model. Context governance needs a separate design covering event fields, diagnostics, collisions, and capture timing across appenders. Native Serde capture and serializer relocation are also deferred; the existing bridge serializer is unchanged.
The README and crate docs use the native facade as the primary entry point, and CI runs a featureless native example. Integration tests cover lazy evaluation, borrowed and nested fields, source metadata, full-record filtering, module filtering, independent logger policies, and native/bridge interoperability.
Validation: workspace tests with all features;
cargo x lint; Rust 1.91 core and featureless facade tests; native integration tests withbridge-logandbridge-log-serdeseparately; the featureless native example; strict core/facade rustdoc. The CI matrix checks Linux, macOS, and Windows on stable and Rust 1.91.Related to #205.