Skip to content

Commit

Permalink
Revert name change of logger instance
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisDyallo committed Aug 13, 2024
1 parent 8bb3072 commit 2dbc4a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 7 additions & 7 deletions Yubico.Core/src/Yubico/Core/Devices/Hid/MacOSHidDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public MacOSHidDevice(long entryId) :
/// </returns>
public static IEnumerable<HidDevice> GetList()
{
ILogger logger = Logging.Log.GetLogger(typeof(MacOSHidDevice).FullName!);
using IDisposable? logScope = logger.BeginScope("MacOSHidDevice.GetList()");
ILogger log = Logging.Log.GetLogger(typeof(MacOSHidDevice).FullName!);
using IDisposable? logScope = log.BeginScope("MacOSHidDevice.GetList()");

IntPtr manager = IntPtr.Zero;
IntPtr deviceSet = IntPtr.Zero;
Expand All @@ -63,7 +63,7 @@ public static IEnumerable<HidDevice> GetList()
deviceSet = IOHIDManagerCopyDevices(manager);

long deviceSetCount = CFSetGetCount(deviceSet);
logger.LogInformation("Found {DeviceCount} HID devices in this device set.", deviceSetCount);
log.LogInformation("Found {DeviceCount} HID devices in this device set.", deviceSetCount);

var devices = new IntPtr[deviceSetCount];

Expand All @@ -84,13 +84,13 @@ public static IEnumerable<HidDevice> GetList()
{
if (manager != IntPtr.Zero)
{
logger.LogInformation("IOHIDManager released.");
log.LogInformation("IOHIDManager released.");
CFRelease(manager);
}

if (deviceSet != IntPtr.Zero)
{
logger.LogInformation("HID device set released.");
log.LogInformation("HID device set released.");
CFRelease(deviceSet);
}
}
Expand All @@ -116,11 +116,11 @@ public override IHidConnection ConnectToIOReports() =>

internal static long GetEntryId(IntPtr device)
{
ILogger Logger = Logging.Log.GetLogger(typeof(MacOSHidDevice).FullName!);
ILogger log = Logging.Log.GetLogger(typeof(MacOSHidDevice).FullName!);

int service = IOHIDDeviceGetService(device);
kern_return_t result = IORegistryEntryGetRegistryEntryID(service, out long entryId);
Logger.IOKitApiCall(nameof(IORegistryEntryGetRegistryEntryID), result);
log.IOKitApiCall(nameof(IORegistryEntryGetRegistryEntryID), result);

if (result != kern_return_t.KERN_SUCCESS)
{
Expand Down
2 changes: 0 additions & 2 deletions Yubico.YubiKey/src/Yubico/YubiKey/FidoDeviceInfoFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
using System.Diagnostics.CodeAnalysis;
using Microsoft.Extensions.Logging;
using Yubico.Core.Devices.Hid;
using Yubico.Core.Logging;
using Yubico.YubiKey.DeviceExtensions;
using Yubico.YubiKey.Fido2.Commands;
using Yubico.YubiKey.U2f.Commands;
Expand Down Expand Up @@ -69,7 +68,6 @@ private static bool TryGetDeviceInfoFromFido(
IHidDevice device,
[MaybeNullWhen(returnValue: false)] out YubiKeyDeviceInfo deviceInfo)
{

try
{
Log.LogInformation("Attempting to read device info via the FIDO interface management command.");
Expand Down

0 comments on commit 2dbc4a3

Please sign in to comment.