Skip to content

Commit 05fe095

Browse files
authored
reduce logging for the tokio fs driver (#1456)
1 parent 5bb82c6 commit 05fe095

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

sdk/core/src/tokio/fs.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use crate::{
44
setters,
55
};
66
use futures::{task::Poll, Future};
7+
use log::debug;
78
use std::{cmp::min, io::SeekFrom, pin::Pin, sync::Arc, task::Context};
89
use tokio::{
910
fs::File,
@@ -99,7 +100,7 @@ impl FileStream {
99100
///
100101
/// This is useful if you want to read the stream in multiple blocks
101102
pub async fn next_block(&mut self) -> crate::Result<()> {
102-
log::info!("setting limit to {}", self.block_size);
103+
debug!("setting limit to {}", self.block_size);
103104
let mut handle = self.handle.clone().lock_owned().await;
104105
{
105106
let inner = handle.get_mut();
@@ -117,10 +118,9 @@ impl SeekableStream for FileStream {
117118
///
118119
/// This is useful upon encountering an error to reset the stream to the last
119120
async fn reset(&mut self) -> crate::Result<()> {
120-
log::info!(
121+
debug!(
121122
"resetting stream to offset {} and limit to {}",
122-
self.offset,
123-
self.block_size
123+
self.offset, self.block_size
124124
);
125125
let mut handle = self.handle.clone().lock_owned().await;
126126
{
@@ -132,11 +132,9 @@ impl SeekableStream for FileStream {
132132
}
133133

134134
fn len(&self) -> usize {
135-
log::info!(
135+
debug!(
136136
"stream len: {} - {} ... {}",
137-
self.stream_size,
138-
self.offset,
139-
self.block_size
137+
self.stream_size, self.offset, self.block_size
140138
);
141139
min(self.stream_size - self.offset, self.block_size) as usize
142140
}

0 commit comments

Comments
 (0)