fix: update Appender trait to include last_event_utc_datetime method#118
fix: update Appender trait to include last_event_utc_datetime method#118
Conversation
There was a problem hiding this comment.
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::buildto returnBox<dyn Appender>instead ofBox<dyn AsyncWrite + Send + Sync>. - Introduce a new
Appendertrait (extendsAsyncWrite) withlast_event_utc_datetime(...). - Update
MultiWriter,NullAppender, andConsoleto use/implement the new trait and invoke the timestamp hook duringpoll_flush.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d8b81cd to
324cd8c
Compare
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 theruntime::logger::Loggerpublic API. If this crate is consumed outside the workspace, consider keepingpub fn new() -> Selfas a thin alias toDefault::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.
1824182 to
bc16a92
Compare
There was a problem hiding this comment.
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.
No description provided.