Skip to content
Snippets Groups Projects
Commit 860e6fc7 authored by Lene Wasskog's avatar Lene Wasskog
Browse files

log: Remove chatty info logging

parent 4b209182
No related branches found
No related tags found
No related merge requests found
...@@ -250,7 +250,6 @@ public class ObservationService { ...@@ -250,7 +250,6 @@ public class ObservationService {
user != null ? user.getOrganizationId().getDefaultLocale() : user != null ? user.getOrganizationId().getDefaultLocale() :
userBean.getOrganization(organizationId).getDefaultLocale()); userBean.getOrganization(organizationId).getDefaultLocale());
LOGGER.info("Get filtered observations for user {}", user != null ? user.getUserId() : "<no user>");
List<ObservationListItem> observations = getFilteredObservationsFromBackend( List<ObservationListItem> observations = getFilteredObservationsFromBackend(
organizationId, organizationId,
observationTimeSeriesId, observationTimeSeriesId,
...@@ -877,14 +876,12 @@ public class ObservationService { ...@@ -877,14 +876,12 @@ public class ObservationService {
//retVal.forEach(o->System.out.println(o.getObservationId())); //retVal.forEach(o->System.out.println(o.getObservationId()));
// If user is not logged in, return only the publicly available observations // If user is not logged in, return only the publicly available observations
if (user == null) { if (user == null) {
LOGGER.info("Return {} masked public observations for unregistered user", retVal.size());
return sortObservationsByDateAndId(retVal); return sortObservationsByDateAndId(retVal);
} }
// Else: This is a registered user without special privileges. Show public observations + user's own // Else: This is a registered user without special privileges. Show public observations + user's own
// Making sure we don't add duplicates // Making sure we don't add duplicates
Set<Integer> obsIds = retVal.stream().map(o -> o.getObservationId()).collect(Collectors.toSet()); Set<Integer> obsIds = retVal.stream().map(o -> o.getObservationId()).collect(Collectors.toSet());
retVal.addAll(observationBean.getObservationsForUser(user).stream().filter(o -> !obsIds.contains(o.getObservationId())).collect(Collectors.toList())); retVal.addAll(observationBean.getObservationsForUser(user).stream().filter(o -> !obsIds.contains(o.getObservationId())).collect(Collectors.toList()));
LOGGER.info("Return {} masked public observations and user's own observations for registered user {}", retVal.size(), user.getUserId());
return sortObservationsByDateAndId(retVal); return sortObservationsByDateAndId(retVal);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment