Skip to content

Commit c8a4abd

Browse files
committed
simplified the tracing::debug!
1 parent df2efa7 commit c8a4abd

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

crates/client/src/api.rs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ impl Client {
223223
) -> Result<SerdeEnvelope<TimestampedCheckpoint>, ClientError> {
224224
let url = self.url.join(paths::fetch_checkpoint());
225225
tracing::debug!(
226-
desc = "getting latest checkpoint",
227-
url = url,
228-
registry_header = ?registry_domain
226+
url,
227+
registry_header = ?registry_domain,
228+
"getting latest checkpoint",
229229
);
230230
into_result::<_, FetchError>(
231231
self.client
@@ -246,9 +246,9 @@ impl Client {
246246
) -> Result<CheckpointVerificationResponse, ClientError> {
247247
let url = self.url.join(paths::verify_checkpoint());
248248
tracing::debug!(
249-
desc = "verifying checkpoint",
250-
url = url,
251-
registry_header = ?registry_domain
249+
url,
250+
registry_header = ?registry_domain,
251+
"verifying checkpoint",
252252
);
253253

254254
let response = self
@@ -270,9 +270,9 @@ impl Client {
270270
) -> Result<FetchLogsResponse, ClientError> {
271271
let url = self.url.join(paths::fetch_logs());
272272
tracing::debug!(
273-
desc = "fetching logs",
274-
url = url,
275-
registry_header = ?registry_domain
273+
url,
274+
registry_header = ?registry_domain,
275+
"fetching logs",
276276
);
277277
let response = self
278278
.client
@@ -302,9 +302,9 @@ impl Client {
302302
) -> Result<FetchPackageNamesResponse, ClientError> {
303303
let url = self.url.join(paths::fetch_package_names());
304304
tracing::debug!(
305-
desc = "fetching package names",
306-
url = url,
307-
registry_header = ?registry_domain
305+
url,
306+
registry_header = ?registry_domain,
307+
"fetching package names",
308308
);
309309
let response = self
310310
.client
@@ -324,9 +324,9 @@ impl Client {
324324
) -> Result<LedgerSourcesResponse, ClientError> {
325325
let url = self.url.join(paths::ledger_sources());
326326
tracing::debug!(
327-
desc = "getting ledger sources",
328-
url = url,
329-
registry_header = ?registry_domain
327+
url,
328+
registry_header = ?registry_domain,
329+
"getting ledger sources",
330330
);
331331
into_result::<_, LedgerError>(
332332
self.client
@@ -348,10 +348,10 @@ impl Client {
348348
) -> Result<PackageRecord, ClientError> {
349349
let url = self.url.join(&paths::publish_package_record(log_id));
350350
tracing::debug!(
351-
desc = "publishing to package",
352351
log_id = log_id.to_string(),
353-
url = url,
354-
registry_header = ?registry_domain
352+
url,
353+
registry_header = ?registry_domain,
354+
"publishing to package",
355355
);
356356
let response = self
357357
.client
@@ -373,11 +373,11 @@ impl Client {
373373
) -> Result<PackageRecord, ClientError> {
374374
let url = self.url.join(&paths::package_record(log_id, record_id));
375375
tracing::debug!(
376-
desc = "getting package record",
377376
log_id = log_id.to_string(),
378377
record_id = record_id.to_string(),
379-
url = url,
380-
registry_header = ?registry_domain
378+
url,
379+
registry_header = ?registry_domain,
380+
"getting package record",
381381
);
382382
into_result::<_, PackageError>(
383383
self.client
@@ -398,10 +398,10 @@ impl Client {
398398
) -> Result<ContentSourcesResponse, ClientError> {
399399
let url = self.url.join(&paths::content_sources(digest));
400400
tracing::debug!(
401-
desc = "getting content sources for digest",
402401
digest = digest.to_string(),
403-
url = url,
404-
registry_header = ?registry_domain
402+
url,
403+
registry_header = ?registry_domain,
404+
"getting content sources for digest",
405405
);
406406
into_result::<_, ContentError>(
407407
self.client
@@ -462,9 +462,9 @@ impl Client {
462462
) -> Result<(), ClientError> {
463463
let url = self.url.join(paths::prove_inclusion());
464464
tracing::debug!(
465-
desc = "proving checkpoint inclusion",
466-
url = url,
467-
registry_header = ?registry_domain
465+
url,
466+
registry_header = ?registry_domain,
467+
"proving checkpoint inclusion",
468468
);
469469
let response = into_result::<InclusionResponse, ProofError>(
470470
self.client

crates/client/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -533,10 +533,10 @@ package_name = &info.name,
533533
let registry_domain = self.get_warg_registry(package.namespace()).await?;
534534

535535
tracing::debug!(
536-
desc = "downloading package",
537536
package = package.as_ref(),
538537
version_requirement = requirement.to_string(),
539-
registry_header = ?registry_domain
538+
registry_header = ?registry_domain,
539+
"downloading",
540540
);
541541

542542
match info.state.find_latest_release(requirement) {
@@ -577,10 +577,10 @@ package_name = &info.name,
577577
let registry_domain = self.get_warg_registry(package.namespace()).await?;
578578

579579
tracing::debug!(
580-
desc = "downloading package version",
581580
package = package.as_ref(),
582581
version = version.to_string(),
583-
registry_header = ?registry_domain
582+
registry_header = ?registry_domain,
583+
"downloading exact version",
584584
);
585585

586586
let release =
@@ -616,9 +616,9 @@ package_name = &info.name,
616616
let checkpoint = &ts_checkpoint.as_ref().checkpoint;
617617

618618
tracing::debug!(
619-
desc = "updating to checkpoint",
620619
log_length = checkpoint.log_length,
621-
registry_header = ?registry_domain
620+
registry_header = ?registry_domain,
621+
"updating to checkpoint",
622622
);
623623

624624
// operator log info

0 commit comments

Comments
 (0)