Skip to content

Commit

Permalink
AA: add envlogger to enable log
Browse files Browse the repository at this point in the history
Before this commit, AA will not enable log by default, so that the
process will not print any output.

Signed-off-by: Xynnn007 <[email protected]>
  • Loading branch information
Xynnn007 committed Mar 28, 2024
1 parent 62047e2 commit 9e3abb1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion attestation-agent/attestation-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ attester = { path = "../attester", default-features = false }
base64.workspace = true
clap = { workspace = true, features = ["derive"], optional = true }
const_format = { workspace = true, optional = true }
env_logger = { workspace = true, optional = true }
kbs_protocol = { path = "../kbs_protocol", default-features = false, optional = true }
log.workspace = true
prost = { workspace = true, optional = true }
Expand Down Expand Up @@ -66,6 +67,6 @@ rust-crypto = ["kbs_protocol?/rust-crypto"]
openssl = ["kbs_protocol?/openssl"]

# Binary RPC type
bin = ["clap", "tokio/rt-multi-thread"]
bin = ["clap", "env_logger", "tokio/rt-multi-thread"]
grpc = ["prost", "tonic", "tonic-build", "tokio/signal"]
ttrpc = ["const_format", "dep:ttrpc", "ttrpc-codegen", "protobuf", "tokio/signal"]
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ struct Cli {

#[tokio::main]
pub async fn main() -> Result<()> {
env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
let cli = Cli::parse();

let attestation_socket = cli.attestation_sock.parse::<SocketAddr>()?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ struct Cli {

#[tokio::main]
pub async fn main() -> Result<()> {
env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
let cli = Cli::parse();

if !Path::new(DEFAULT_UNIX_SOCKET_DIR).exists() {
Expand Down

0 comments on commit 9e3abb1

Please sign in to comment.