Skip to content

Commit

Permalink
feat: add log
Browse files Browse the repository at this point in the history
  • Loading branch information
arifBurakDemiray committed Jan 23, 2024
1 parent 3cdb82e commit c2d2f46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.stream.Collectors;
import ly.count.sdk.java.Countly;
import ly.count.sdk.java.Session;
import ly.count.sdk.java.View;

public class ModuleEvents extends ModuleBase {
protected EventQueue eventQueue = null;
Expand Down Expand Up @@ -95,7 +96,7 @@ private synchronized void addEventsToRequestQ(String deviceId) {
ModuleRequests.pushAsync(internalConfig, request);
}

protected static void removeInvalidDataFromSegments(Map<String, Object> segments) {
protected static void removeInvalidDataFromSegments(Map<String, Object> segments, Log L) {

if (segments == null || segments.isEmpty()) {
return;
Expand Down Expand Up @@ -125,7 +126,7 @@ protected void recordEventInternal(String key, int count, Double sum, Double dur

L.d("[ModuleEvents] recordEventInternal, Recording event with key: [" + key + "] and provided event ID of:[" + eventIdOverride + "] and segmentation with:[" + (segmentation == null ? "null" : segmentation.size()) + "] keys");

removeInvalidDataFromSegments(segmentation);
removeInvalidDataFromSegments(segmentation, L);

String eventId, pvid = null, cvid = null;
if (Utils.isEmptyOrNull(eventIdOverride)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ void setGlobalViewSegmentationInternal(@Nullable Map<String, Object> segmentatio

if (segmentation != null) {
removeReservedKeysFromViewSegmentation(segmentation);
ModuleEvents.removeInvalidDataFromSegments(segmentation);
ModuleEvents.removeInvalidDataFromSegments(segmentation, L);
globalViewSegmentation.putAll(segmentation);
}
}

public void updateGlobalViewSegmentationInternal(@Nonnull Map<String, Object> segmentation) {
removeReservedKeysFromViewSegmentation(segmentation);
ModuleEvents.removeInvalidDataFromSegments(segmentation);
ModuleEvents.removeInvalidDataFromSegments(segmentation, L);

globalViewSegmentation.putAll(segmentation);
}
Expand Down

0 comments on commit c2d2f46

Please sign in to comment.