Tweaks to the lessen ShortcutRepository logging

At the moment the logs are just getting too large, so trying to remove some of the less important and repetitive log entries.
This commit is contained in:
Terry MacDonald 2021-11-22 22:53:31 +13:00
parent 67729942a1
commit f8f2dc89d9

View File

@ -232,7 +232,7 @@ namespace DisplayMagician
public static bool ContainsShortcut(ShortcutItem shortcut)
{
logger.Trace($"ShortcutRepository/ContainsShortcut: Checking whether {shortcut.Name} exists in our shortcut repository");
//logger.Trace($"ShortcutRepository/ContainsShortcut: Checking whether {shortcut.Name} exists in our shortcut repository");
if (!(shortcut is ShortcutItem))
return false;
@ -241,18 +241,18 @@ namespace DisplayMagician
{
if (testShortcut.UUID.Equals(shortcut.UUID, StringComparison.OrdinalIgnoreCase))
{
logger.Trace($"ShortcutRepository/ContainsShortcut: {shortcut.Name} does exist in our shortcut repository");
//logger.Trace($"ShortcutRepository/ContainsShortcut: {shortcut.Name} does exist in our shortcut repository");
return true;
}
}
logger.Trace($"ShortcutRepository/ContainsShortcut: Shortcut with name {shortcut.Name} doesn't exist in our shortcut repository");
return false;
}
public static bool ContainsShortcut(string shortcutNameOrUuid)
{
logger.Trace($"ShortcutRepository/ContainsShortcut2: Checking whether {shortcutNameOrUuid} exists in our shortcut repository");
//logger.Trace($"ShortcutRepository/ContainsShortcut2: Checking whether {shortcutNameOrUuid} exists in our shortcut repository");
if (String.IsNullOrWhiteSpace(shortcutNameOrUuid))
{
@ -267,7 +267,7 @@ namespace DisplayMagician
{
if (testShortcut.UUID.Equals(shortcutNameOrUuid, StringComparison.OrdinalIgnoreCase))
{
logger.Trace($"ShortcutRepository/ContainsShortcut2: Shortcut with UUID {shortcutNameOrUuid} does exist in our shortcut repository");
//logger.Trace($"ShortcutRepository/ContainsShortcut2: Shortcut with UUID {shortcutNameOrUuid} does exist in our shortcut repository");
return true;
}
}
@ -279,7 +279,7 @@ namespace DisplayMagician
{
if (testShortcut.Name.Equals(shortcutNameOrUuid, StringComparison.OrdinalIgnoreCase))
{
logger.Trace($"ShortcutRepository/ContainsShortcut2: Shortcut with name {shortcutNameOrUuid} does exist in our shortcut repository");
//logger.Trace($"ShortcutRepository/ContainsShortcut2: Shortcut with name {shortcutNameOrUuid} does exist in our shortcut repository");
return true;
}
}