OpenDAL has native support for tracing.
TracingLayer will add tracing for OpenDAL operations.
Enable tracing layer requires enable feature
use anyhow::Result; use opendal::layers::TracingLayer; use opendal::Operator; use opendal::Scheme; let _ = Operator::from_env(Scheme::Fs) .expect("must init") .layer(TracingLayer);
OpenDAL is using
tracing for tracing internally.
To enable tracing output, please init one of the subscribers that
extern crate tracing; let my_subscriber = FooSubscriber::new(); tracing::subscriber::set_global_default(my_subscriber) .expect("setting tracing default failed");
For real-world usage, please take a look at