Skip to content

Commit

Permalink
Improved ability to dynamically change user ID
Browse files Browse the repository at this point in the history
  • Loading branch information
audaciouscode committed Aug 2, 2017
1 parent 8bbc7b2 commit ebbbc81
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/edu/northwestern/cbits/anthracite/Logger.java
Expand Up @@ -118,7 +118,7 @@ public class Logger

private Context _context = null;
private long _lastUpload = 0;
private final String _userId;
private String _userId;

public Logger(Context context, String userId)
{
Expand Down Expand Up @@ -163,6 +163,10 @@ public static Logger getInstance(Context context, String userId)
return Logger._sharedInstance;
}

public void updateUserId(String userId) {
this._userId = userId;
}

@SuppressLint({"BadHostnameVerifier", "TrustAllX509TrustManager", "MissingPermission"})
public boolean log(String event, Map<String, Object> payload)
{
Expand Down Expand Up @@ -658,7 +662,6 @@ public int pendingEventsCount()
return count;
}


public void logException(Throwable e)
{
e.printStackTrace();
Expand Down

0 comments on commit ebbbc81

Please sign in to comment.