Skip to content

Commit

Permalink
feat(cargo-shuttle): outgoing body debug (#1828)
Browse files Browse the repository at this point in the history
* feat(cargo-shuttle): outgoing body debug

* docs
jonaro00 authored Jul 18, 2024

Verified

This commit was signed with the committer’s verified signature.
1 parent c537566 commit 1d8a281
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cargo-shuttle/src/args.rs
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ pub struct ShuttleArgs {
/// Disable network requests that are not strictly necessary. Limits some features.
#[arg(long, env = "SHUTTLE_OFFLINE")]
pub offline: bool,
/// Turn on tracing output for cargo-shuttle and shuttle libraries.
/// Turn on tracing output for Shuttle libraries. (WARNING: can print sensitive data)
#[arg(long, env = "SHUTTLE_DEBUG")]
pub debug: bool,
/// Target Shuttle's development environment
2 changes: 2 additions & 0 deletions cargo-shuttle/src/client.rs
Original file line number Diff line number Diff line change
@@ -446,6 +446,7 @@ impl ShuttleApiClient {

if let Some(body) = body {
let body = serde_json::to_string(&body)?;
debug!("Outgoing body: {}", body);
builder = builder.body(body);
builder = builder.header("Content-Type", "application/json");
}
@@ -461,6 +462,7 @@ impl ShuttleApiClient {

if let Some(body) = body {
let body = serde_json::to_string(&body)?;
debug!("Outgoing body: {}", body);
builder = builder.body(body);
builder = builder.header("Content-Type", "application/json");
}

0 comments on commit 1d8a281

Please sign in to comment.