Skip to content

Commit

Permalink
Added source field to OpLog
Browse files Browse the repository at this point in the history
Close #136
  • Loading branch information
henry0715-dev committed Oct 28, 2024
1 parent d38bc68 commit e5b869b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ file is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and
this project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Added `source` field to `OpLog`.

## [0.20.0] - 2024-09-10

### Changed
Expand Down
5 changes: 3 additions & 2 deletions src/ingest/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub struct OpLog {
pub agent_name: String,
pub log_level: OpLogLevel,
pub contents: String,
pub source: String,
// Category, id
}

Expand All @@ -46,8 +47,8 @@ impl Display for OpLog {
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
write!(
f,
"{}\t{:?}\t{}",
self.agent_name, self.log_level, self.contents
"{}\t{:?}\t{}\t{}",
self.agent_name, self.log_level, self.contents, self.source
)
}
}
Expand Down

0 comments on commit e5b869b

Please sign in to comment.