Skip to content

Commit

Permalink
feat: switch to json logs
Browse files Browse the repository at this point in the history
  • Loading branch information
zleyyij committed Sep 8, 2024
1 parent d742924 commit 32cc0ee
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
13 changes: 13 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions databases/src/cpu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ impl CpuCache {
}
}

impl Default for CpuCache {
fn default() -> Self {
Self::new()
}
}

/// Take the input model name, and try to parse it into an [IndexEntry]
fn generate_index_entry(name: &str) -> Result<IndexEntry, Box<dyn std::error::Error + '_>> {
let model_token = find_model(name);
Expand Down
2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ clap = { version = "4.5", features = ["derive"] }
tokio = { version = "1.40.0", features = ["full"] }
tower-http = { version = "0.5.1", features = ["cors", "trace"] }
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
tracing-subscriber = { version = "0.3.18", features = ["json"] }
1 change: 1 addition & 0 deletions server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// initialize logging
let cli_args = Args::parse();
tracing_subscriber::fmt()
.json()
.with_span_events(FmtSpan::CLOSE)
.init();
// log::set_logger(&LOGGER)
Expand Down

0 comments on commit 32cc0ee

Please sign in to comment.