Skip to content

Commit 32cc0ee

Browse files
committed
feat: switch to json logs
1 parent d742924 commit 32cc0ee

4 files changed

Lines changed: 21 additions & 1 deletion

File tree

Cargo.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databases/src/cpu/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ impl CpuCache {
162162
}
163163
}
164164

165+
impl Default for CpuCache {
166+
fn default() -> Self {
167+
Self::new()
168+
}
169+
}
170+
165171
/// Take the input model name, and try to parse it into an [IndexEntry]
166172
fn generate_index_entry(name: &str) -> Result<IndexEntry, Box<dyn std::error::Error + '_>> {
167173
let model_token = find_model(name);

server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ clap = { version = "4.5", features = ["derive"] }
1515
tokio = { version = "1.40.0", features = ["full"] }
1616
tower-http = { version = "0.5.1", features = ["cors", "trace"] }
1717
tracing = "0.1.40"
18-
tracing-subscriber = "0.3.18"
18+
tracing-subscriber = { version = "0.3.18", features = ["json"] }

server/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
8282
// initialize logging
8383
let cli_args = Args::parse();
8484
tracing_subscriber::fmt()
85+
.json()
8586
.with_span_events(FmtSpan::CLOSE)
8687
.init();
8788
// log::set_logger(&LOGGER)

0 commit comments

Comments
 (0)