[frontend] Adjust logging severity of some errors

This commit is contained in:
Lilian 2025-02-17 23:16:51 +01:00
parent 7e8b62f9cf
commit 3a51684e07
No known key found for this signature in database
4 changed files with 6 additions and 6 deletions

View file

@ -33,7 +33,7 @@ public class LazyComponent : ComponentBase, IAsyncDisposable
if (Visible) return Js.Invoke<float>("getHeight", Target);
else
{
Logger.LogError("Invisible, no height available");
Logger.LogWarning("Invisible, no height available");
return null;
}
}

View file

@ -228,7 +228,7 @@ public class VirtualScroller<T> : ComponentBase, IDisposable where T : IIdentifi
if (height == 0)
{
var add = Items.TryAdd(item.Id, item);
if (add is false) Logger.LogError($"Duplicate notification: {item.Id}");
if (add is false) Logger.LogWarning($"Duplicate notification: {item.Id}");
}
ReRender();

View file

@ -43,7 +43,7 @@ internal class NotificationStore : NoteMessageProvider, IAsyncDisposable
private void OnNotification(object? _, NotificationResponse notificationResponse)
{
var add = Notifications.TryAdd(notificationResponse.Id, notificationResponse);
if (add is false) _logger.LogError($"Duplicate notification: {notificationResponse.Id}");
if (add is false) _logger.LogWarning($"Duplicate notification: {notificationResponse.Id}");
Notification?.Invoke(this, notificationResponse);
}
@ -55,7 +55,7 @@ internal class NotificationStore : NoteMessageProvider, IAsyncDisposable
foreach (var notification in res)
{
var add = Notifications.TryAdd(notification.Id, notification);
if (add is false) _logger.LogError($"Duplicate notification: {notification.Id}");
if (add is false) _logger.LogWarning($"Duplicate notification: {notification.Id}");
}
return res;

View file

@ -78,7 +78,7 @@ internal class TimelineStore : NoteMessageProvider, IAsyncDisposable, IStreaming
foreach (var note in res)
{
var add = Timelines[timeline].Timeline.TryAdd(note.Id, note);
if (add is false) _logger.LogError($"Duplicate note: {note.Id}");
if (add is false) _logger.LogWarning($"Duplicate note: {note.Id}");
}
return res;
@ -168,7 +168,7 @@ internal class TimelineStore : NoteMessageProvider, IAsyncDisposable, IStreaming
if (success)
{
var add = home!.Timeline.TryAdd(response.Id, response);
if (add is false) _logger.LogError($"Duplicate note: {response.Id}");
if (add is false) _logger.LogWarning($"Duplicate note: {response.Id}");
}
ItemPublished?.Invoke(this, response);
}