diff --git a/lib/wasix/Cargo.toml b/lib/wasix/Cargo.toml index 881309a4596..21f07cfb5df 100644 --- a/lib/wasix/Cargo.toml +++ b/lib/wasix/Cargo.toml @@ -165,6 +165,7 @@ sys-default = [ "ctrlc" ] sys-poll = [] +extra-logging = [] sys-thread = ["tokio/rt", "tokio/time", "tokio/rt-multi-thread", "rusty_pool"] journal = ["tokio/fs", "wasmer-journal/log-file"] diff --git a/lib/wasix/src/syscalls/wasi/clock_time_get.rs b/lib/wasix/src/syscalls/wasi/clock_time_get.rs index 33cad5ba50a..f1caab9635e 100644 --- a/lib/wasix/src/syscalls/wasi/clock_time_get.rs +++ b/lib/wasix/src/syscalls/wasi/clock_time_get.rs @@ -1,6 +1,9 @@ use super::*; use crate::syscalls::*; +// NOTE: This syscall is not instrumented since it will be logged too much, +// hence introducing too much noise to the logs. + /// ### `clock_time_get()` /// Get the time of the specified clock /// Inputs: @@ -11,8 +14,10 @@ use crate::syscalls::*; /// Output: /// - `Timestamp *time` /// The value of the clock in nanoseconds -//#[instrument(level = "trace", skip_all, fields(?clock_id, %precision), ret)] -#[instrument(level = "trace", skip_all, ret)] +#[cfg_attr( + feature = "extra-logging", + tracing::instrument(level = "trace", skip_all, ret) +)] pub fn clock_time_get( mut ctx: FunctionEnvMut<'_, WasiEnv>, clock_id: Snapshot0Clockid,