wasi-common: switch all logs from log to tracing

tracing is already the dep that wiggle uses.

I used tracing structured arguments wherever I could, but I skipped over
it in all of the snapshot_0 code, because I'm going to delete that code
and replace it with wiggle-based stuff real soon.
This commit is contained in:
Pat Hickey
2020-08-18 10:35:05 -07:00
parent 30b9e69136
commit 94ee96712a
26 changed files with 135 additions and 132 deletions

View File

@@ -11,11 +11,11 @@ use crate::old::snapshot_0::wasi::{self, WasiError, WasiResult};
use crate::old::snapshot_0::{helpers, host, wasi32};
use crate::sandboxed_tty_writer::SandboxedTTYWriter;
use filetime::{set_file_handle_times, FileTime};
use log::trace;
use std::fs::File;
use std::io::{self, Read, Seek, SeekFrom, Write};
use std::ops::DerefMut;
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use tracing::trace;
pub(crate) unsafe fn fd_close(
wasi_ctx: &mut WasiCtx,
@@ -686,8 +686,8 @@ pub(crate) unsafe fn path_rename(
true,
)?;
log::debug!("path_rename resolved_old={:?}", resolved_old);
log::debug!("path_rename resolved_new={:?}", resolved_new);
tracing::debug!("path_rename resolved_old={:?}", resolved_old);
tracing::debug!("path_rename resolved_new={:?}", resolved_new);
hostcalls_impl::path_rename(resolved_old, resolved_new)
}
@@ -950,7 +950,7 @@ pub(crate) unsafe fn path_remove_directory(
true,
)?;
log::debug!("path_remove_directory resolved={:?}", resolved);
tracing::debug!("path_remove_directory resolved={:?}", resolved);
hostcalls_impl::path_remove_directory(resolved)
}