Skip to content

Commit

Permalink
Added some extra logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lol3rrr committed Oct 30, 2023
1 parent 8d52486 commit cd9d835
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/storage/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ impl S3Storage {
}

impl StorageBackend for S3Storage {
#[tracing::instrument(skip(self, content))]
fn write(
&mut self,
content: Vec<u8>,
Expand All @@ -26,11 +27,17 @@ impl StorageBackend for S3Storage {
let filename = filename;
let content = content;

tracing::trace!("Storing to S3 Bucket");

let res = bucket.put_object(&filename, &content);

match res.await {
Ok(_) => Ok(()),
Err(e) => Err(()),
Err(e) => {
tracing::error!("{:?}", e);

Err(())
}
}
})
}
Expand Down

0 comments on commit cd9d835

Please sign in to comment.