Skip to content

Commit 996c67b

Browse files
author
Klein Hu
committed
Write to Debug Channel
1 parent 8c08153 commit 996c67b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/ResourceManager/MachineLearning/Commands.MachineLearning/Cmdlets/WebServicesCmdletBase.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected override void BeginProcessing()
8282
}
8383
catch (Exception ex)
8484
{
85-
this.WriteVersionInfoToVerboseChannel();
85+
this.WriteVersionInfoToDebugChannel();
8686
if (this.IsFatalException(ex))
8787
{
8888
ThrowTerminatingError(
@@ -106,7 +106,7 @@ protected override void EndProcessing()
106106
}
107107
catch (Exception ex)
108108
{
109-
this.WriteVersionInfoToVerboseChannel();
109+
this.WriteVersionInfoToDebugChannel();
110110
if (this.IsFatalException(ex))
111111
{
112112
ThrowTerminatingError(
@@ -140,7 +140,7 @@ protected override void StopProcessing()
140140
}
141141
catch (Exception ex)
142142
{
143-
this.WriteVersionInfoToVerboseChannel();
143+
this.WriteVersionInfoToDebugChannel();
144144
if (this.IsFatalException(ex))
145145
{
146146
throw;
@@ -172,7 +172,7 @@ public override void ExecuteCmdlet()
172172
}
173173
catch (Exception ex)
174174
{
175-
this.WriteVersionInfoToVerboseChannel();
175+
this.WriteVersionInfoToDebugChannel();
176176

177177
if (this.IsFatalException(ex))
178178
{
@@ -334,10 +334,10 @@ ex is SecurityException ||
334334
ex is SEHException;
335335
}
336336

337-
private void WriteVersionInfoToVerboseChannel()
337+
private void WriteVersionInfoToDebugChannel()
338338
{
339-
var versionInfo = typeof(WebServicesCmdletBase).Assembly.GetName().Version;
340-
this.WriteVerbose(Resources.VersionInfo.FormatInvariant(versionInfo.ToString(3)));
339+
var versionInfo = this.MyInvocation.MyCommand.Module.Version;
340+
this.WriteDebug(Resources.VersionInfo.FormatInvariant(versionInfo.ToString(3)));
341341
}
342342
}
343343
}

0 commit comments

Comments
 (0)