Skip to content

Commit c4afd9c

Browse files
committed
Remove irrelavant debug lines, small fixes
1 parent 360633d commit c4afd9c

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/ResourceManager/DataLakeStore/Commands.DataLakeStore/DataPlaneModels/DataLakeStoreFileSystemClient.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ public DataLakeStoreFileSystemClient(IAzureContext context, DataLakeStoreFileSys
9999
if (_isDebugEnabled)
100100
{
101101
_adlsLoggerConfig = new LoggingConfiguration();
102-
cmdlet.WriteObject(null);
103102
// Custom target that logs the debug messages from the SDK to the powershell framework's debug message queue
104103
var adlsTarget = new AdlsLoggerTarget
105104
{
@@ -112,9 +111,9 @@ public DataLakeStoreFileSystemClient(IAzureContext context, DataLakeStoreFileSys
112111
var rule = new LoggingRule("adls.dotnet.*", NLog.LogLevel.Debug, adlsTarget);
113112
_adlsLoggerConfig.LoggingRules.Add(rule);
114113

115-
/* var powershellLoggingRule =
114+
var powershellLoggingRule =
116115
new LoggingRule("adls.powershell.WebTransport", NLog.LogLevel.Debug, adlsTarget);
117-
_adlsLoggerConfig.LoggingRules.Add(powershellLoggingRule);*/
116+
_adlsLoggerConfig.LoggingRules.Add(powershellLoggingRule);
118117

119118
// Enable the NLog configuration to use this
120119
LogManager.Configuration = _adlsLoggerConfig;
@@ -207,8 +206,8 @@ public AclProcessorStats ChangeAclRecursively(string path, string accountName, L
207206
if (trackProgress)
208207
{
209208
progress = new ProgressRecord(_uniqueActivityIdGenerator.Next(0, 10000000),
210-
string.Format($"Recursive acl change for path {path} and type {aclChangeType}"),
211-
$"Acl {aclChangeType}")
209+
string.Format($"Recursive acl change for path {path}"),
210+
$"Type of Acl Change: {aclChangeType}")
212211
{
213212
PercentComplete = 0
214213
};
@@ -220,7 +219,7 @@ public AclProcessorStats ChangeAclRecursively(string path, string accountName, L
220219
{
221220
progress.PercentComplete = 0;
222221
progress.Activity =
223-
$"Acl {aclChangeType}: Files enumerated: {e.FilesProcessed} Directories enumerated:{e.DirectoryProcessed}";
222+
$"Files enumerated: {e.FilesProcessed} Directories enumerated:{e.DirectoryProcessed}";
224223

225224
}
226225
};
@@ -793,10 +792,10 @@ private void TrackTaskProgress(Task task, Cmdlet commandToUpdateProgressFor, Pro
793792

794793
if (DateTime.Now - lastUpdate > TimeSpan.FromSeconds(1))
795794
{
796-
lock (ConsoleOutputLock)
795+
if (taskProgress != null && !token.IsCancellationRequested &&
796+
!commandToUpdateProgressFor.Stopping)
797797
{
798-
if (taskProgress != null && !token.IsCancellationRequested &&
799-
!commandToUpdateProgressFor.Stopping)
798+
lock (ConsoleOutputLock)
800799
{
801800
commandToUpdateProgressFor.WriteProgress(taskProgress);
802801
}

0 commit comments

Comments
 (0)