Skip to content

Commit f12b364

Browse files
committed
Merge branch 'develop' of https://github.com/duke7553/files-uwp into develop
2 parents 2110ed8 + 016c05d commit f12b364

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Files/Filesystem/Drives.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@
1313
using Windows.Storage;
1414
using Windows.UI.Core;
1515
using Windows.UI.Xaml;
16+
using NLog;
1617

1718
namespace Files.Filesystem
1819
{
1920
public class DrivesManager
2021
{
22+
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
23+
2124
public ObservableCollection<DriveItem> Drives { get; } = new ObservableCollection<DriveItem>();
2225
public bool ShowUserConsentOnInit { get; set; } = false;
2326
private DeviceWatcher _deviceWatcher;
@@ -90,6 +93,8 @@ private async void DeviceAdded(DeviceWatcher sender, DeviceInformation args)
9093
Visibility.Visible,
9194
type);
9295

96+
Logger.Info($"Drive added: {driveItem.tag}, {driveItem.Type}");
97+
9398
// Update the collection on the ui-thread.
9499
try
95100
{
@@ -117,6 +122,8 @@ private async void DeviceRemoved(DeviceWatcher sender, DeviceInformationUpdate a
117122
continue;
118123
}
119124

125+
Logger.Info($"Drive removed: {drive.tag}");
126+
120127
// Update the collection on the ui-thread.
121128
try
122129
{
@@ -211,6 +218,8 @@ private async Task GetDrives(IList<DriveItem> list)
211218
Visibility.Visible,
212219
type);
213220

221+
Logger.Info($"Drive added: {driveItem.tag}, {driveItem.Type}");
222+
214223
list.Add(driveItem);
215224
}
216225
}

Files/Settings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ public static class LocalSettings
1111
public const string DateTimeFormat = "datetimeformat";
1212
public const string Theme = "theme";
1313
}
14-
}
14+
}

0 commit comments

Comments
 (0)