@@ -10,6 +10,7 @@ use chrono::{DateTime, Utc};
1010use postgres:: Client ;
1111use std:: collections:: { HashMap , HashSet } ;
1212use std:: sync:: Arc ;
13+ use tracing:: debug;
1314
1415#[ must_use = "FakeRelease does nothing until you call .create()" ]
1516pub ( crate ) struct FakeRelease < ' a > {
@@ -303,14 +304,14 @@ impl<'a> FakeRelease<'a> {
303304 . with_context ( || format ! ( "failed to create {}" , path. display( ) ) ) ?;
304305 }
305306 let file = base_path. join ( & path) ;
306- tracing :: debug!( "writing file {}" , file. display( ) ) ;
307+ debug ! ( "writing file {}" , file. display( ) ) ;
307308 fs:: write ( file, data) ?;
308309 }
309310 Ok ( ( ) )
310311 } ;
311312
312313 let upload_files = |kind : FileKind , source_directory : & Path | {
313- tracing :: debug!(
314+ debug ! (
314315 "adding directory {:?} from {}" ,
315316 kind,
316317 source_directory. display( )
@@ -324,7 +325,7 @@ impl<'a> FakeRelease<'a> {
324325 ( source_archive_path ( & package. name , & package. version ) , false )
325326 }
326327 } ;
327- tracing :: debug!( "store in archive: {:?}" , archive) ;
328+ debug ! ( "store in archive: {:?}" , archive) ;
328329 let ( files_list, new_alg) = crate :: db:: add_path_into_remote_archive (
329330 & storage,
330331 & archive,
@@ -347,11 +348,11 @@ impl<'a> FakeRelease<'a> {
347348 }
348349 } ;
349350
350- tracing :: debug!( "before upload source" ) ;
351+ debug ! ( "before upload source" ) ;
351352 let source_tmp = create_temp_dir ( ) ;
352353 store_files_into ( & self . source_files , source_tmp. path ( ) ) ?;
353354 let ( source_meta, algs) = upload_files ( FileKind :: Sources , source_tmp. path ( ) ) ?;
354- tracing :: debug!( "added source files {}" , source_meta) ;
355+ debug ! ( "added source files {}" , source_meta) ;
355356
356357 // If the test didn't add custom builds, inject a default one
357358 if self . builds . is_empty ( ) {
@@ -370,19 +371,19 @@ impl<'a> FakeRelease<'a> {
370371
371372 // store default target files
372373 store_files_into ( & rustdoc_files, rustdoc_path) ?;
373- tracing :: debug!( "added rustdoc files" ) ;
374+ debug ! ( "added rustdoc files" ) ;
374375
375376 for target in & package. targets [ 1 ..] {
376377 let platform = target. src_path . as_ref ( ) . unwrap ( ) ;
377378 let platform_dir = rustdoc_path. join ( platform) ;
378379 fs:: create_dir ( & platform_dir) ?;
379380
380381 store_files_into ( & rustdoc_files, & platform_dir) ?;
381- tracing :: debug!( "added platform files for {}" , platform) ;
382+ debug ! ( "added platform files for {}" , platform) ;
382383 }
383384
384385 let ( rustdoc_meta, _) = upload_files ( FileKind :: Rustdoc , rustdoc_path) ?;
385- tracing :: debug!( "uploaded rustdoc files: {}" , rustdoc_meta) ;
386+ debug ! ( "uploaded rustdoc files: {}" , rustdoc_meta) ;
386387 }
387388
388389 let repository = match self . github_stats {
0 commit comments