Skip to content

Commit

Permalink
Change log level of response exceptions to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerlittin committed Nov 6, 2023
1 parent 93ea51e commit 5521b9b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
projectName = analytics
version = 2.0.1
version = 2.0.2
wseLibDir = /Library/WowzaStreamingEngine/lib
15 changes: 9 additions & 6 deletions src/main/java/com/wowza/wms/plugin/analytics/GA4.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

public class GA4
{
private static final Class CLASS = GA4.class;
private static final Class<GA4> CLASS = GA4.class;
private static final String CLASSNAME = CLASS.getSimpleName();
private final IApplicationInstance appInstance;
private final WMSLogger logger;
Expand Down Expand Up @@ -81,10 +81,13 @@ public void sendEvent(SessionInfo sessionInfo, VideoEvent event)

client.sendAsync(builder.build(), HttpResponse.BodyHandlers.discarding())
.whenCompleteAsync((response, exception) -> {
if (exception != null)
logger.error(CLASSNAME + ".sendEvent [" + appInstance.getContextStr() + "] request: " + uri, exception);
else if (debugEnabled)
logger.info(CLASSNAME + ".sendEvent [" + appInstance.getContextStr() + "] request: " + uri + ", response: " + response.statusCode());
});
if (debugEnabled)
{
if (exception != null)
logger.error(CLASSNAME + ".sendEvent [" + appInstance.getContextStr() + "] request: " + uri, exception);
else
logger.info(CLASSNAME + ".sendEvent [" + appInstance.getContextStr() + "] request: " + uri + ", response: " + response.statusCode());
}
});
}
}

0 comments on commit 5521b9b

Please sign in to comment.