Skip to content

Commit

Permalink
feat: add LogPayloads parameter to API cmdlets
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfbecker committed Dec 17, 2018
1 parent c1ac244 commit c8ae5e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/KubeApiCmdlet.cs
Expand Up @@ -20,6 +20,10 @@ public abstract class KubeApiCmdlet : KubeCmdlet {
[Parameter()]
public SwitchParameter AllowInsecure { get; set; }

/// <summary>Log request payloads to the verbose output channel</summary>
[Parameter()]
public SwitchParameter LogPayloads { get; set; }

protected K8sConfig config;

/// <summary>The API client to be used by child cmdlets</summary>
Expand All @@ -37,7 +41,7 @@ public abstract class KubeApiCmdlet : KubeCmdlet {
}
WriteVerbose($"Using endpoint {clientOptions.ApiEndPoint}");
// clientOptions.LogHeaders = true;
// clientOptions.LogPayloads = true;
clientOptions.LogPayloads = LogPayloads;
client = KubeApiClient.Create(clientOptions, LoggerFactory);
}

Expand Down

0 comments on commit c8ae5e9

Please sign in to comment.