File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1515
1616use opendal:: Operator ;
1717
18+ use opendal:: layers:: LoggingLayer ;
1819use opendal:: services:: azblob;
1920
2021use crate :: errors:: * ;
@@ -27,6 +28,7 @@ impl AzureBlobCache {
2728 builder. container ( container) ;
2829 builder. root ( key_prefix) ;
2930
30- Ok ( builder. build ( ) ?. into ( ) )
31+ let op: Operator = builder. build ( ) ?. into ( ) ;
32+ Ok ( op. layer ( LoggingLayer :: default ( ) ) )
3133 }
3234}
Original file line number Diff line number Diff line change @@ -335,8 +335,9 @@ impl Storage for opendal::Operator {
335335 let hit = CacheRead :: from ( io:: Cursor :: new ( res) ) ?;
336336 Ok ( Cache :: Hit ( hit) )
337337 }
338+ Err ( e) if e. kind ( ) == opendal:: ErrorKind :: ObjectNotFound => Ok ( Cache :: Miss ) ,
338339 Err ( e) => {
339- warn ! ( "Got error: {:?}" , e) ;
340+ warn ! ( "Got unexpected error: {:?}" , e) ;
340341 Ok ( Cache :: Miss )
341342 }
342343 }
Original file line number Diff line number Diff line change 1414// limitations under the License.
1515
1616use crate :: errors:: * ;
17- use opendal:: services:: gcs;
1817use opendal:: Operator ;
18+ use opendal:: { layers:: LoggingLayer , services:: gcs} ;
1919use reqsign:: { GoogleBuilder , GoogleToken , GoogleTokenLoad } ;
2020
2121#[ derive( Copy , Clone ) ]
@@ -67,7 +67,8 @@ impl GCSCache {
6767 }
6868 builder. signer ( signer_builder. build ( ) ?) ;
6969
70- Ok ( builder. build ( ) ?. into ( ) )
70+ let op: Operator = builder. build ( ) ?. into ( ) ;
71+ Ok ( op. layer ( LoggingLayer :: default ( ) ) )
7172 }
7273}
7374
Original file line number Diff line number Diff line change 1010// See the License for the specific language governing permissions and
1111// limitations under the License.
1212
13+ use opendal:: layers:: LoggingLayer ;
1314use opendal:: services:: s3;
1415use opendal:: Operator ;
1516
@@ -41,7 +42,8 @@ impl S3Cache {
4142 builder. endpoint ( & endpoint_resolver ( endpoint, use_ssl) ?) ;
4243 }
4344
44- Ok ( builder. build ( ) ?. into ( ) )
45+ let op: Operator = builder. build ( ) ?. into ( ) ;
46+ Ok ( op. layer ( LoggingLayer :: default ( ) ) )
4547 }
4648}
4749
You can’t perform that action at this time.
0 commit comments