-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] Splash, SignIn, SignUp 로깅 세팅 #197
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8c202ce
[FEAT] SplashLogging (#156)
KxxHyoRim 27a39a0
[FEAT] SignIn ExposureLogging (#156)
KxxHyoRim 3b46bae
[FEAT] SignUpActivity ExposureLogging (#156)
KxxHyoRim 2554f1f
[FEAT] BaseViewModel에 shotSwmLogging 추가 (#156)
KxxHyoRim c16f1b4
[FEAT] TermsFragment - 이용약관, 개인정보 처리방침 클릭 로깅 (#156)
KxxHyoRim ae0f138
[FEAT] NickNameFragment ExposureLogging (#156)
KxxHyoRim bdcab41
[FEAT] IntroductionFragment ExposureLogging (#156)
KxxHyoRim c6e0ac7
[FEAT] ChooseRoleFragment ExposureLogging (#156)
KxxHyoRim 53b47da
[FEAT] EducationStatus ExposureLogging (#156)
KxxHyoRim da9cb8c
[FEAT] RealNameFragment ExposureLogging (#156)
KxxHyoRim f856e9f
[FEAT] Set Throttle time limit to 0.3sec (#156)
KxxHyoRim 38df120
[FEAT] SignUp Process ExposureLogging Complete (#156)
KxxHyoRim 25238d7
[REFACTOR] logging 관련 코드가 domain 모듈을 거치도록 수정 (#156)
KxxHyoRim aa91efb
Merge 25238d75a65510aa4a94d6370176de127d9cd2bf into 0c374069839e32929…
KxxHyoRim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
data/src/main/java/com/lgtm/android/data/repository/LoggingRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.lgtm.android.data.repository | ||
|
||
import com.lgtm.domain.repository.LoggingRepository | ||
import com.swm.logging.android.SWMLogging | ||
import com.swm.logging.android.logging_scheme.SWMLoggingScheme | ||
import javax.inject.Inject | ||
|
||
class LoggingRepositoryImpl @Inject constructor() : LoggingRepository { | ||
override fun shotSwmLogging(scheme: SWMLoggingScheme) { | ||
SWMLogging.logEvent(scheme) | ||
} | ||
} |
67 changes: 67 additions & 0 deletions
67
domain/src/main/java/com/lgtm/domain/logging/SwmCommonLoggingScheme.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package com.lgtm.domain.logging | ||
|
||
import com.swm.logging.android.logging_scheme.SWMLoggingScheme | ||
import java.lang.reflect.Type | ||
|
||
class SwmCommonLoggingScheme( | ||
eventLogName: String, | ||
screenName: String, | ||
logVersion: String, | ||
logData: Map<String, Any>, | ||
) : SWMLoggingScheme() { | ||
|
||
init { | ||
setLoggingScheme( | ||
eventLogName = eventLogName, | ||
screenName = screenName, | ||
logVersion = logVersion, | ||
logData = logData.toMutableMap() | ||
) | ||
} | ||
|
||
class Builder { | ||
private lateinit var eventLogName: String | ||
private lateinit var screenName: String | ||
private var logVersion: String = "1" | ||
private var map = mapOf<String, Any>() | ||
|
||
fun setEventLogName(eventLogName: String): Builder { | ||
this.eventLogName = eventLogName | ||
return this | ||
} | ||
|
||
fun setScreenName(screenName: String): Builder { | ||
this.screenName = screenName | ||
return this | ||
} | ||
|
||
fun setScreenName(type: Type): Builder { | ||
check(type is Class<*>) | ||
this.screenName = type.simpleName | ||
return this | ||
} | ||
|
||
|
||
fun setLogData(map: Map<String, Any>): Builder { | ||
this.map = map | ||
return this | ||
} | ||
|
||
fun setLogVersion(logVersion: Int): Builder { | ||
this.logVersion = logVersion.toString() | ||
return this | ||
} | ||
|
||
fun build(): SwmCommonLoggingScheme { | ||
check(::eventLogName.isInitialized) { "eventLogName is not initialized" } | ||
check(::screenName.isInitialized) { "screenName is not initialized" } | ||
|
||
return SwmCommonLoggingScheme( | ||
eventLogName, | ||
screenName, | ||
logVersion, | ||
map | ||
) | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
domain/src/main/java/com/lgtm/domain/repository/LoggingRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.lgtm.domain.repository | ||
|
||
import com.swm.logging.android.logging_scheme.SWMLoggingScheme | ||
|
||
interface LoggingRepository { | ||
fun shotSwmLogging(scheme: SWMLoggingScheme) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ import com.lgtm.android.auth.ui.signup.SignUpActivity | |
import com.lgtm.android.common_ui.base.BaseActivity | ||
import com.lgtm.android.common_ui.util.NetworkState | ||
import com.lgtm.android.common_ui.util.setOnThrottleClickListener | ||
import com.lgtm.domain.logging.SwmCommonLoggingScheme | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
|
@@ -31,6 +32,7 @@ class SignInActivity : BaseActivity<ActivitySignInBinding>(R.layout.activity_sig | |
initClickListener() | ||
observeGithubLoginResponse() | ||
observePatchDeviceTokenStatus() | ||
shotSignInExposureLogging() | ||
} | ||
|
||
private fun setAnimationOnGithubButton() { | ||
|
@@ -118,6 +120,15 @@ class SignInActivity : BaseActivity<ActivitySignInBinding>(R.layout.activity_sig | |
Toast.makeText(this, message, Toast.LENGTH_SHORT).show() | ||
} | ||
|
||
private fun shotSignInExposureLogging() { | ||
val scheme = SwmCommonLoggingScheme.Builder() | ||
.setEventLogName("signInExposure") | ||
.setScreenName(this.javaClass) | ||
.build() | ||
signInViewModel.shotSignInExposureLogging(scheme) | ||
} | ||
Comment on lines
+123
to
+129
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 모든 액티비티마다 이러한 로깅을 쏘게된다면 BaseActivity에 묻어서 로깅을 처리할 방법은 없을지도 생각해보면 좋을거같아요. |
||
|
||
|
||
companion object { | ||
const val MEMBER_DATA = "memberData" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 메소드는 어디에 속한 메소드인가요?