From 35c8cfdc5a1eac47c7ae8f5979037eb58dfaae93 Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim Date: Wed, 13 Dec 2023 13:47:19 +0100 Subject: [PATCH] Debug notification --- .../databook/server/DBCassandraAstyanaxImpl.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java b/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java index 91dd25e..a5cc237 100644 --- a/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java +++ b/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java @@ -2188,11 +2188,12 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore { */ @Override public List getUserNotificationChannels(String userid, NotificationType notificationType) throws NotificationChannelTypeNotFoundException, NotificationTypeNotFoundException { - _log.trace("Asking for Single Notification preference of " + userid + " Type: " + notificationType); + _log.info("Asking for Single Notification preference of " + userid + " Type: " + notificationType); List toReturn = new ArrayList(); NotificationChannelType[] toProcess = getUserNotificationPreferences(userid).get(notificationType); + _log.info("size of user notification preferences" + toProcess.length); if (toProcess == null) { - _log.warn("Single Notification preference of " + userid + " Type: " + notificationType + " not existing ... creating default"); + _log.info("Single Notification preference of " + userid + " Type: " + notificationType + " not existing ... creating default"); return createNewNotificationType(userid, notificationType); } else if (toProcess.length == 0) @@ -2209,6 +2210,7 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore { */ private List createNewNotificationType(String userid, NotificationType notificationType) { List toReturn = new ArrayList(); + _log.info("Create new notification type"); CqlSession session = conn.getKeyspaceSession(); String valueToInsert = ""; @@ -2234,9 +2236,11 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore { } if (res) { - _log.trace("Set New Notification Setting for " + userid + " OK"); + _log.info("Set New Notification Setting for " + userid + " OK"); + _log.info("toreturn:" + toReturn.toString()); return toReturn; } + _log.info("empty list"); return new ArrayList(); //no notification if sth fails } /**