Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions firebase-sessions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Unreleased
* [fixed] Removed extraneous logs that risk leaking internal identifiers.


# 2.0.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ internal class EventGDTLogger(private val transportFactoryProvider: Provider<Tra

private fun encode(value: SessionEvent): ByteArray {
val jsonEvent = SessionEvents.SESSION_EVENT_ENCODER.encode(value)
Log.d(TAG, "Session Event: $jsonEvent")
Log.d(TAG, "Session Event Type: ${value.eventType.name}")
return jsonEvent.toByteArray()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ internal class SessionFirelogPublisherImpl(
private fun attemptLoggingSessionEvent(sessionEvent: SessionEvent) {
try {
eventGDTLogger.log(sessionEvent)
Log.d(TAG, "Successfully logged Session Start event: ${sessionEvent.sessionData.sessionId}")
Log.d(TAG, "Successfully logged Session Start event.")
} catch (ex: RuntimeException) {
Log.e(TAG, "Error logging Session Start event to DataTransport: ", ex)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ internal class SessionLifecycleClient(private val backgroundDispatcher: Coroutin
}

private fun handleSessionUpdate(sessionId: String) {
Log.d(TAG, "Session update received: $sessionId")
Log.d(TAG, "Session update received.")

CoroutineScope(backgroundDispatcher).launch {
FirebaseSessionsDependencies.getRegisteredSubscribers().values.forEach { subscriber ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ internal class SessionLifecycleService : Service() {
/** Generates a new session id and sends it everywhere it's needed */
private fun newSession() {
SessionGenerator.instance.generateNewSession()
Log.d(TAG, "Generated new session ${SessionGenerator.instance.currentSession.sessionId}")
Log.d(TAG, "Generated new session.")
broadcastSession()
SessionDatastore.instance.updateSessionId(SessionGenerator.instance.currentSession.sessionId)
}
Expand All @@ -138,7 +138,7 @@ internal class SessionLifecycleService : Service() {
* connected clients.
*/
private fun broadcastSession() {
Log.d(TAG, "Broadcasting new session: ${SessionGenerator.instance.currentSession}")
Log.d(TAG, "Broadcasting new session")
SessionFirelogPublisher.instance.logSession(SessionGenerator.instance.currentSession)
// Create a defensive copy because DeadObjectExceptions on send will modify boundClients
val clientsToSend = ArrayList(boundClients)
Expand All @@ -151,7 +151,7 @@ internal class SessionLifecycleService : Service() {
} else {
// Send the value from the datastore before the first foregrounding it exists
val storedSession = SessionDatastore.instance.getCurrentSessionId()
Log.d(TAG, "App has not yet foregrounded. Using previously stored session: $storedSession")
Log.d(TAG, "App has not yet foregrounded. Using previously stored session.")
storedSession?.let { sendSessionToClient(client, it) }
}
}
Expand Down
Loading