Skip to content

fix: update Appender trait to include last_event_utc_datetime method#118

Merged
ruslanti merged 4 commits intomainfrom
fix/event_datetime
Mar 10, 2026
Merged

fix: update Appender trait to include last_event_utc_datetime method#118
ruslanti merged 4 commits intomainfrom
fix/event_datetime

Conversation

@ruslanti
Copy link
Collaborator

No description provided.

Copy link
Contributor

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 updates the runtime logger’s appender abstraction by introducing a new Appender trait and extending the fan-out writer to notify appenders of a UTC timestamp during flush operations.

Changes:

  • Change AppenderBuilder::build to return Box<dyn Appender> instead of Box<dyn AsyncWrite + Send + Sync>.
  • Introduce a new Appender trait (extends AsyncWrite) with last_event_utc_datetime(...).
  • Update MultiWriter, NullAppender, and Console to use/implement the new trait and invoke the timestamp hook during poll_flush.

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

@ruslanti ruslanti force-pushed the fix/event_datetime branch from d8b81cd to 324cd8c Compare March 10, 2026 10:27
Copy link
Contributor

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.


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

Copy link
Contributor

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

crates/runtime/src/logger.rs:168

  • Logger::new() was removed, which is a breaking change for any downstream code using the runtime::logger::Logger public API. If this crate is consumed outside the workspace, consider keeping pub fn new() -> Self as a thin alias to Default::default() (optionally deprecated) to preserve compatibility.
impl Logger {
    /// Builder-style method to attach an additional appender.
    pub fn with_appender<S: AppenderBuilder + Sync + Send + 'static>(mut self, sink: S) -> Self {
        self.appenders.push(Arc::new(sink));
        self
    }

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

Copy link
Contributor

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


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

@ruslanti ruslanti requested a review from qrdl March 10, 2026 14:20
@ruslanti ruslanti merged commit 765f709 into main Mar 10, 2026
5 of 7 checks passed
@ruslanti ruslanti deleted the fix/event_datetime branch March 10, 2026 14:47
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.

3 participants