From 7603e57ae9c90e45e773e85a7a433d9e1e48d5e4 Mon Sep 17 00:00:00 2001 From: Jumar Macato <16554748+jmacato@users.noreply.github.com> Date: Tue, 26 Oct 2021 23:48:23 +0800 Subject: [PATCH] fix review comments --- src/Avalonia.FreeDesktop/DBusTrayIconImpl.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Avalonia.FreeDesktop/DBusTrayIconImpl.cs b/src/Avalonia.FreeDesktop/DBusTrayIconImpl.cs index 28f1b62f8a..29b1d7fa72 100644 --- a/src/Avalonia.FreeDesktop/DBusTrayIconImpl.cs +++ b/src/Avalonia.FreeDesktop/DBusTrayIconImpl.cs @@ -49,7 +49,7 @@ namespace Avalonia.FreeDesktop if (_connection is null) { - Logger.TryGet(LogEventLevel.Error, LogArea.X11Platform) + Logger.TryGet(LogEventLevel.Error, "DBUS") ?.Log(this, "Unable to get a dbus connection for system tray icons."); return; @@ -76,9 +76,9 @@ namespace Avalonia.FreeDesktop } catch { - Logger.TryGet(LogEventLevel.Error, LogArea.X11Platform) + Logger.TryGet(LogEventLevel.Error, "DBUS") ?.Log(this, - "DBUS: org.kde.StatusNotifierWatcher service is not available on this system. System Tray Icons will not work without it."); + "org.kde.StatusNotifierWatcher service is not available on this system. Tray Icons will not work without it."); return; } @@ -131,6 +131,9 @@ namespace Avalonia.FreeDesktop } catch (Exception e) { + Logger.TryGet(LogEventLevel.Error, "DBUS") + ?.Log(this, $"Error creating a DBus tray icon: {e}."); + _serviceConnected = false; }