add debug logging

This commit is contained in:
Athou
2024-07-03 17:40:23 +02:00
parent 6685057dae
commit c3cbd18df9
2 changed files with 2 additions and 1 deletions

View File

@@ -168,6 +168,7 @@ public class FeedRefreshUpdater {
if (subscriptions == null) {
feed.setMessage("No new entries found");
} else if (inserted > 0) {
log.debug("inserted {} entries for feed {}", inserted, feed.getId());
List<User> users = subscriptions.stream().map(FeedSubscription::getUser).toList();
cache.invalidateUnreadCount(subscriptions.toArray(new FeedSubscription[0]));
cache.invalidateUserRootCategory(users.toArray(new User[0]));

View File

@@ -39,7 +39,7 @@ public class WebSocketSessions {
public void sendMessage(User user, String text) {
Set<Session> userSessions = sessions.get(user.getId());
if (userSessions != null && !userSessions.isEmpty()) {
log.debug("sending '{}' to {} users via websocket", text, userSessions.size());
log.debug("sending '{}' to user {} via websocket ({} sessions)", text, user.getId(), userSessions.size());
for (Session userSession : userSessions) {
if (userSession.isOpen()) {
userSession.getAsyncRemote().sendText(text);