Skip to content

Fixing debug message tracing issue in AutoRest clients (Fixes issue #1905) #1906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Common/Commands.Common/Commands.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@
<Compile Include="RecordingTracingInterceptor.cs" />
<Compile Include="ClientCreatedArgs.cs" />
<Compile Include="CmdletExtensions.cs" />
<Compile Include="ServiceClientTracingInterceptor.cs" />
<Compile Include="TestMockSupport.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ValidateGuidNotEmpty.cs" />
Expand Down
79 changes: 0 additions & 79 deletions src/Common/Commands.Common/ServiceClientTracingInterceptor.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ protected override void LogCmdletEndInvocationInfo()

protected override void SetupDebuggingTraces()
{
ServiceClientTracing.IsEnabled = true;
base.SetupDebuggingTraces();
_serviceClientTracingInterceptor = _serviceClientTracingInterceptor
?? new ServiceClientTracingInterceptor(DebugMessages);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using Microsoft.WindowsAzure.Commands.Common;
using Microsoft.WindowsAzure.Commands.Utilities.Common;

namespace Microsoft.Azure.Commands.ResourceManager.Common
{
public class ServiceClientTracingInterceptor : IServiceClientTracingInterceptor
Expand Down Expand Up @@ -50,13 +52,13 @@ public void Information(string message)

public void ReceiveResponse(string invocationId, System.Net.Http.HttpResponseMessage response)
{
string responseAsString = response == null ? string.Empty : response.AsFormattedString();
string responseAsString = response == null ? string.Empty : GeneralUtilities.GetLog(response);
MessageQueue.CheckAndEnqueue(responseAsString);
}

public void SendRequest(string invocationId, System.Net.Http.HttpRequestMessage request)
{
string requestAsString = request == null ? string.Empty : request.AsFormattedString();
string requestAsString = request == null ? string.Empty : GeneralUtilities.GetLog(request);
MessageQueue.CheckAndEnqueue(requestAsString);
}

Expand Down