Merge pull request #25871 from Susko3/fix-logfile-notification

Fix opening log files from notification not presenting the correct file
This commit is contained in:
Dan Balasescu 2023-12-19 10:21:18 +09:00 committed by GitHub
commit b6ed792a41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1190,7 +1190,7 @@ private void forwardGeneralLogsToNotifications()
}
else if (recentLogCount == short_term_display_limit)
{
string logFile = $@"{entry.Target.Value.ToString().ToLowerInvariant()}.log";
string logFile = Logger.GetLogger(entry.Target.Value).Filename;
Schedule(() => Notifications.Post(new SimpleNotification
{
@ -1198,7 +1198,7 @@ private void forwardGeneralLogsToNotifications()
Text = NotificationsStrings.SubsequentMessagesLogged,
Activated = () =>
{
Storage.GetStorageForDirectory(@"logs").PresentFileExternally(logFile);
Logger.Storage.PresentFileExternally(logFile);
return true;
}
}));