Skip to content

Commit 5b4b3f2

Browse files
author
Jonathan Woollett-Light
committed
fix: tracing
Replaces custom logger with `tracing_subscriber`. Signed-off-by: Jonathan Woollett-Light <jcawl@amazon.co.uk>
1 parent c2278c7 commit 5b4b3f2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+334
-388
lines changed

Cargo.lock

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

src/api_server/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ mmds = { path = "../mmds" }
2121
seccompiler = { path = "../seccompiler" }
2222
utils = { path = "../utils" }
2323
vmm = { path = "../vmm" }
24+
tracing = { version = "0.1.37", features = ["attributes"] }
2425

2526
[dev-dependencies]
2627
libc = "0.2.117"

src/api_server/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ use std::path::PathBuf;
1515
use std::sync::mpsc;
1616

1717
use logger::{
18-
debug, error, info, update_metric_with_elapsed_time, warn, ProcessTimeReporter, METRICS,
18+
update_metric_with_elapsed_time, ProcessTimeReporter, METRICS,
1919
};
2020
pub use micro_http::{
2121
Body, HttpServer, Method, Request, RequestError, Response, ServerError, ServerRequest,
2222
ServerResponse, StatusCode, Version,
2323
};
2424
use seccompiler::BpfProgramRef;
2525
use serde_json::json;
26+
use tracing::{debug, error, info, warn};
2627
use utils::eventfd::EventFd;
2728
use vmm::rpc_interface::{VmmAction, VmmActionError, VmmData};
2829
use vmm::vmm_config::snapshot::SnapshotType;

src/api_server/src/parsed_request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
use std::fmt::Debug;
55

6-
use logger::{error, info};
76
use micro_http::{Body, Method, Request, Response, StatusCode, Version};
87
use serde::ser::Serialize;
98
use serde_json::Value;
9+
use tracing::{error, info};
1010
use vmm::rpc_interface::{VmmAction, VmmActionError};
1111

1212
use super::VmmData;

0 commit comments

Comments
 (0)