Skip to content

Commit dd39ef1

Browse files
author
Hovsep
committed
Merge pull request #1906 from markcowl/release-1.2.2.1
Fixing debug message tracing issue in AutoRest clients (Fixes issue #1905)
2 parents e386fa9 + 88d9b9c commit dd39ef1

File tree

4 files changed

+5
-82
lines changed

4 files changed

+5
-82
lines changed

src/Common/Commands.Common/Commands.Common.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@
159159
<Compile Include="RecordingTracingInterceptor.cs" />
160160
<Compile Include="ClientCreatedArgs.cs" />
161161
<Compile Include="CmdletExtensions.cs" />
162-
<Compile Include="ServiceClientTracingInterceptor.cs" />
163162
<Compile Include="TestMockSupport.cs" />
164163
<Compile Include="Properties\AssemblyInfo.cs" />
165164
<Compile Include="ValidateGuidNotEmpty.cs" />

src/Common/Commands.Common/ServiceClientTracingInterceptor.cs

Lines changed: 0 additions & 79 deletions
This file was deleted.

src/ResourceManager/Common/Commands.ResourceManager.Common/AzureRMCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ protected override void LogCmdletEndInvocationInfo()
204204

205205
protected override void SetupDebuggingTraces()
206206
{
207+
ServiceClientTracing.IsEnabled = true;
207208
base.SetupDebuggingTraces();
208209
_serviceClientTracingInterceptor = _serviceClientTracingInterceptor
209210
?? new ServiceClientTracingInterceptor(DebugMessages);

src/ResourceManager/Common/Commands.ResourceManager.Common/ServiceClientTracingInterceptor.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
using System.Collections.Concurrent;
1818
using System.Collections.Generic;
1919
using Microsoft.WindowsAzure.Commands.Common;
20+
using Microsoft.WindowsAzure.Commands.Utilities.Common;
21+
2022
namespace Microsoft.Azure.Commands.ResourceManager.Common
2123
{
2224
public class ServiceClientTracingInterceptor : IServiceClientTracingInterceptor
@@ -50,13 +52,13 @@ public void Information(string message)
5052

5153
public void ReceiveResponse(string invocationId, System.Net.Http.HttpResponseMessage response)
5254
{
53-
string responseAsString = response == null ? string.Empty : response.AsFormattedString();
55+
string responseAsString = response == null ? string.Empty : GeneralUtilities.GetLog(response);
5456
MessageQueue.CheckAndEnqueue(responseAsString);
5557
}
5658

5759
public void SendRequest(string invocationId, System.Net.Http.HttpRequestMessage request)
5860
{
59-
string requestAsString = request == null ? string.Empty : request.AsFormattedString();
61+
string requestAsString = request == null ? string.Empty : GeneralUtilities.GetLog(request);
6062
MessageQueue.CheckAndEnqueue(requestAsString);
6163
}
6264

0 commit comments

Comments
 (0)