Repository navigation
Log HTTP Request and Response when Debug Switch is specified. - #232
Conversation
… for logging purposes when Debug is specified. On Module init, hook EventHandler into EventListener delegate.
|
Changes to AutoRest.Powershell have been reviewed and merged. |
| // Set of header fields that should not get serialized | ||
| private static readonly HashSet<string> _neverSerializedHeaderFields = new HashSet<string>(StringComparer.OrdinalIgnoreCase) | ||
| { | ||
| "SdkVersion", |
There was a problem hiding this comment.
Why are we not Serializing SdkVersion and FeatureFlag? Or Cache-Control, or Date?
There was a problem hiding this comment.
This is legacy from the contrib project. Would it be preferable to serialize all headers, including Authorization?
There was a problem hiding this comment.
We should serialize headers that are useful in tracing an issue/bug. For instance, we need SdkVersion to know which version of the SDK the customer was running, featureFlag to know which middleware handlers they have enabled e.t.c. Authorization header is not useful, and we shouldn't serialize it.
Move print method to EventExtentions.
use nameof in exceptions. add appropriate license headers.
|
Generated a sample module using the latest autorest.powershell that includes our code generator changes, generates correctly and |
Hook into Signal infrastructure to capture HTTP Request and Responses for logging purposes when Debug is specified.
On Module init, hook EventHandler delegate into EventListener delegate.
Use HttpFormatter from contrib repo. Does not show the Authorization header (Access Token).
Depends on changes in autorest.powershell generator
Covers task AB#4720