refactor(filesystem): Use info! rather than event!
This commit is contained in:
parent
7155cf7628
commit
2c07bb5af3
1 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ use std::{
|
|||
};
|
||||
|
||||
use tempfile::{tempdir, TempDir};
|
||||
use tracing::{event, Level};
|
||||
use tracing::info;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum FileSystem {
|
||||
|
@ -46,7 +46,7 @@ pub trait FileSystemEnv: Sync + Send + std::fmt::Debug {
|
|||
use std::io::{LineWriter, Write};
|
||||
|
||||
let path = self.in_cwd(file_name);
|
||||
event!(Level::INFO, "writing to {:?}", path);
|
||||
info!("writing to {:?}", path);
|
||||
let file = File::create(path.clone())?;
|
||||
let mut file = LineWriter::new(file);
|
||||
file.write_all(content.as_bytes())?;
|
||||
|
@ -91,7 +91,7 @@ impl RealFileSystemEnv {
|
|||
impl TempFileSystemEnv {
|
||||
fn new() -> std::io::Result<Self> {
|
||||
let temp_dir = tempdir()?;
|
||||
event!(Level::INFO, "temp dir: {:?}", temp_dir.path());
|
||||
info!("temp dir: {:?}", temp_dir.path());
|
||||
let cwd = temp_dir.path().to_path_buf();
|
||||
let temp_dir = Arc::new(Mutex::new(temp_dir));
|
||||
Ok(Self { cwd, temp_dir })
|
||||
|
|
Loading…
Reference in a new issue