Skip to content

Show only one log warning message about missing icon for a file extension.  #98

@end2endzone

Description

@end2endzone

Describe the bug
When the application fails to find an icon based on a file's extension, the warning message is displayed multiple times in the logs:

W0924 17:29:09.709913  7076 Icon.cpp:93] Failed to find icon for file extension 'md'. Resolving icon with default icon for unknown file type 'C:\Windows\system32\imageres.dll' with index '2'
W0924 17:29:13.807147  7076 Icon.cpp:93] Failed to find icon for file extension 'md'. Resolving icon with default icon for unknown file type 'C:\Windows\system32\imageres.dll' with index '2'
W0924 17:30:29.756491  7076 Icon.cpp:93] Failed to find icon for file extension 'md'. Resolving icon with default icon for unknown file type 'C:\Windows\system32\imageres.dll' with index '2'
W0924 17:30:40.330096  7076 Icon.cpp:93] Failed to find icon for file extension 'md'. Resolving icon with default icon for unknown file type 'C:\Windows\system32\imageres.dll' with index '2'
W0924 17:30:45.859412  7076 Icon.cpp:93] Failed to find icon for file extension 'md'. Resolving icon with default icon for unknown file type 'C:\Windows\system32\imageres.dll' with index '2'
W0924 21:01:27.486472  7076 Icon.cpp:93] Failed to find icon for file extension 'md'. Resolving icon with default icon for unknown file type 'C:\Windows\system32\imageres.dll' with index '2'
W0924 21:04:31.776013  7076 Icon.cpp:93] Failed to find icon for file extension 'md'. Resolving icon with default icon for unknown file type 'C:\Windows\system32\imageres.dll' with index '2'
W0924 21:04:48.452966  7076 Icon.cpp:93] Failed to find icon for file extension 'md'. Resolving icon with default icon for unknown file type 'C:\Windows\system32\imageres.dll' with index '2'

This log message appears every time the system cannot find the icon for md files. This message is not required to be printed multiple times.

To Reproduce
Steps to reproduce the behavior:

  1. Create a file with an unknown extension. For example test.12345.
  2. Create a Configuration which includes a menu with an <icon> using the file's extension. For example: <icon fileextension="12345" />
  3. Right-click on the file to show the menu.
  4. Look at the WARNING level logs.

Expected behavior
The message should appears only once per file extension.

Screenshots
N/A

Environment

  • OS: Windows 7
  • Version 0.6.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions