@@ -237,7 +237,7 @@ pub fn mtime_recursive(path: &Path) -> Result<FileTime> {
237
237
Err ( e) => {
238
238
// Ignore errors while walking. If Cargo can't access it, the
239
239
// build script probably can't access it, either.
240
- log :: debug!( "failed to determine mtime while walking directory: {}" , e) ;
240
+ tracing :: debug!( "failed to determine mtime while walking directory: {}" , e) ;
241
241
None
242
242
}
243
243
} )
@@ -252,7 +252,7 @@ pub fn mtime_recursive(path: &Path) -> Result<FileTime> {
252
252
// I'm not sure when this is really possible (maybe a
253
253
// race with unlinking?). Regardless, if Cargo can't
254
254
// read it, the build script probably can't either.
255
- log :: debug!(
255
+ tracing :: debug!(
256
256
"failed to determine mtime while fetching symlink metadata of {}: {}" ,
257
257
e. path( ) . display( ) ,
258
258
err
@@ -271,7 +271,7 @@ pub fn mtime_recursive(path: &Path) -> Result<FileTime> {
271
271
// Can't access the symlink target. If Cargo can't
272
272
// access it, the build script probably can't access
273
273
// it either.
274
- log :: debug!(
274
+ tracing :: debug!(
275
275
"failed to determine mtime of symlink target for {}: {}" ,
276
276
e. path( ) . display( ) ,
277
277
err
@@ -286,7 +286,7 @@ pub fn mtime_recursive(path: &Path) -> Result<FileTime> {
286
286
// I'm not sure when this is really possible (maybe a
287
287
// race with unlinking?). Regardless, if Cargo can't
288
288
// read it, the build script probably can't either.
289
- log :: debug!(
289
+ tracing :: debug!(
290
290
"failed to determine mtime while fetching metadata of {}: {}" ,
291
291
e. path( ) . display( ) ,
292
292
err
@@ -314,7 +314,7 @@ pub fn set_invocation_time(path: &Path) -> Result<FileTime> {
314
314
"This file has an mtime of when this was started." ,
315
315
) ?;
316
316
let ft = mtime ( & timestamp) ?;
317
- log :: debug!( "invocation time for {:?} is {}" , path, ft) ;
317
+ tracing :: debug!( "invocation time for {:?} is {}" , path, ft) ;
318
318
Ok ( ft)
319
319
}
320
320
@@ -508,7 +508,7 @@ pub fn link_or_copy(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> Result<()>
508
508
}
509
509
510
510
fn _link_or_copy ( src : & Path , dst : & Path ) -> Result < ( ) > {
511
- log :: debug!( "linking {} to {}" , src. display( ) , dst. display( ) ) ;
511
+ tracing :: debug!( "linking {} to {}" , src. display( ) , dst. display( ) ) ;
512
512
if same_file:: is_same_file ( src, dst) . unwrap_or ( false ) {
513
513
return Ok ( ( ) ) ;
514
514
}
@@ -567,7 +567,7 @@ fn _link_or_copy(src: &Path, dst: &Path) -> Result<()> {
567
567
} ;
568
568
link_result
569
569
. or_else ( |err| {
570
- log :: debug!( "link failed {}. falling back to fs::copy" , err) ;
570
+ tracing :: debug!( "link failed {}. falling back to fs::copy" , err) ;
571
571
fs:: copy ( src, dst) . map ( |_| ( ) )
572
572
} )
573
573
. with_context ( || {
@@ -598,8 +598,8 @@ pub fn copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> Result<u64> {
598
598
pub fn set_file_time_no_err < P : AsRef < Path > > ( path : P , time : FileTime ) {
599
599
let path = path. as_ref ( ) ;
600
600
match filetime:: set_file_times ( path, time, time) {
601
- Ok ( ( ) ) => log :: debug!( "set file mtime {} to {}" , path. display( ) , time) ,
602
- Err ( e) => log :: warn!(
601
+ Ok ( ( ) ) => tracing :: debug!( "set file mtime {} to {}" , path. display( ) , time) ,
602
+ Err ( e) => tracing :: warn!(
603
603
"could not set mtime of {} to {}: {:?}" ,
604
604
path. display( ) ,
605
605
time,
@@ -621,7 +621,7 @@ pub fn strip_prefix_canonical<P: AsRef<Path>>(
621
621
let safe_canonicalize = |path : & Path | match path. canonicalize ( ) {
622
622
Ok ( p) => p,
623
623
Err ( e) => {
624
- log :: warn!( "cannot canonicalize {:?}: {:?}" , path, e) ;
624
+ tracing :: warn!( "cannot canonicalize {:?}: {:?}" , path, e) ;
625
625
path. to_path_buf ( )
626
626
}
627
627
} ;
0 commit comments