-
Notifications
You must be signed in to change notification settings - Fork 1
[feat] 로깅 1차 구현 #83
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
Open
Gobans
wants to merge
12
commits into
develop
Choose a base branch
from
feat/logging
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[feat] 로깅 1차 구현 #83
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bb9567f
[feat] 로깅 1차 구현
Gobans 8b879b4
[refactor] 로깅 수정
Gobans 113d87c
[chore] shotLogging throw 로 변경
Gobans c056f0f
[chore] 빠진 userId 추가
Gobans 14ebd8a
Merge branch 'develop' of https://github.com/SWM14-Lito/lito-ios into…
Gobans 05dab4a
Merge branch 'develop' of https://github.com/SWM14-Lito/lito-ios into…
Gobans 6c2cd6e
[feat] observer 작업중
Gobans 160969b
[feat] throttle 시도 1차
ddophi98 5d9b1bf
[feat] AnyEncodable 타입 커스텀
ddophi98 9ee979a
[feat] rx 쓰지 않고 throttle 구현
ddophi98 51d0c28
[fix] 피드백 반영
ddophi98 dcd356e
[feat] LearningHome 화면의 추천 문제, 풀던 문제 클릭 로깅 구현
ddophi98 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
75 changes: 75 additions & 0 deletions
75
Projects/Domain/Sources/Logging/LearningHomeRecommendedProblemClickedScheme.swift
This file contains hidden or 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,75 @@ | ||
| // | ||
| // ProblemClickedScheme.swift | ||
| // Domain | ||
| // | ||
| // Created by 김동락 on 2023/10/11. | ||
| // Copyright © 2023 com.lito. All rights reserved. | ||
| // | ||
|
|
||
| import Foundation | ||
| import SWMLogging | ||
|
|
||
| public struct LearningHomeRecommendedProblemClickedScheme: ClickScheme { | ||
|
|
||
| public var eventLogName = "LearningHomeRecommendedProblemClicked" | ||
| public var screenName = "LearningHome" | ||
| public var logVersion = 1 | ||
| public var logData: [String: AnyEncodable] = [:] | ||
|
|
||
| // 학습목표, 학습퍼센트, 풀던문제 존재 여부, 문제 id, 문제 카테고리, 문제 질문, 찜여부 | ||
| public init(learningGoal: Int?, learningPercent: Float?, isSolvingProblemExist: Bool?, problemId: Int?, problemCategory: String?, problemQuestion: String?, problemFavorite: Bool?) { | ||
| if let learningGoal = learningGoal { self.logData["learningGoal"] = .int(learningGoal)} | ||
| if let learningPercent = learningPercent { self.logData["learningPercent"] = .float(learningPercent)} | ||
| if let isSolvingProblemExist = isSolvingProblemExist { self.logData["isSolvingProblemExist"] = .bool(isSolvingProblemExist)} | ||
| if let problemId = problemId { self.logData["problemId"] = .int(problemId)} | ||
| if let problemCategory = problemCategory { self.logData["problemCategory"] = .string(problemCategory)} | ||
| if let problemQuestion = problemQuestion { self.logData["problemQuestion"] = .string(problemQuestion)} | ||
| if let problemFavorite = problemFavorite { self.logData["problemFavorite"] = .bool(problemFavorite)} | ||
| } | ||
|
|
||
| public class Builder { | ||
| var learningGoal: Int? | ||
| var learningPercent: Float? | ||
| var isSolvingProblemExist: Bool? | ||
| var problemId: Int? | ||
| var problemCategory: String? | ||
| var problemQuestion: String? | ||
| var problemFavorite: Bool? | ||
|
|
||
| public init() { } | ||
|
|
||
| public func setLearningGoal(_ learningGoal: Int) -> Builder { | ||
| self.learningGoal = learningGoal | ||
| return self | ||
| } | ||
| public func setLearningPercent(_ learningPercent: Float) -> Builder { | ||
| self.learningPercent = learningPercent | ||
| return self | ||
| } | ||
| public func setIsSolvingProblemExist(_ isSolvingProblemExist: Bool) -> Builder { | ||
| self.isSolvingProblemExist = isSolvingProblemExist | ||
| return self | ||
| } | ||
| public func setProblemId(_ problemId: Int) -> Builder { | ||
| self.problemId = problemId | ||
| return self | ||
| } | ||
| public func setProblemCategory(_ problemCategory: String) -> Builder { | ||
| self.problemCategory = problemCategory | ||
| return self | ||
| } | ||
| public func setProblemQuestion(_ problemQuestion: String) -> Builder { | ||
| self.problemQuestion = problemQuestion | ||
| return self | ||
| } | ||
| public func setProblemFavorite(_ problemFavorite: Bool) -> Builder { | ||
| self.problemFavorite = problemFavorite | ||
| return self | ||
| } | ||
| public func build() -> SWMLoggingScheme { | ||
| return LearningHomeRecommendedProblemClickedScheme(learningGoal: learningGoal, learningPercent: learningPercent, isSolvingProblemExist: isSolvingProblemExist, problemId: problemId, problemCategory: problemCategory, problemQuestion: problemQuestion, problemFavorite: problemFavorite) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } |
82 changes: 82 additions & 0 deletions
82
Projects/Domain/Sources/Logging/LearningHomeSolvingProblemClickedScheme.swift
This file contains hidden or 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,82 @@ | ||
| // | ||
| // LearningHomeSolvingProblemClickedScheme.swift | ||
| // Domain | ||
| // | ||
| // Created by 김동락 on 2023/10/11. | ||
| // Copyright © 2023 com.lito. All rights reserved. | ||
| // | ||
|
|
||
| import Foundation | ||
| import SWMLogging | ||
|
|
||
| public struct LearningHomeSolvingProblemClickedScheme: ClickScheme { | ||
|
|
||
| public var eventLogName = "LearningHomeSolvingProblemClicked" | ||
| public var screenName = "LearningHome" | ||
| public var logVersion = 1 | ||
| public var logData: [String: AnyEncodable] = [:] | ||
|
|
||
| // 학습목표, 학습퍼센트, 추천문제 개수, 추천문제 풀이한 개수, 문제 id, 문제 카테고리, 문제 질문, 찜여부 | ||
| public init(learningGoal: Int?, learningPercent: Float?, recommendedProblemsCount: Int?, recommendedProblemsSolvedCount: Int?, problemId: Int?, problemCategory: String?, problemQuestion: String?, problemFavorite: Bool?) { | ||
| if let learningGoal = learningGoal { self.logData["learningGoal"] = .int(learningGoal)} | ||
| if let learningPercent = learningPercent { self.logData["learningPercent"] = .float(learningPercent)} | ||
| if let recommendedProblemsCount = recommendedProblemsCount { self.logData["recommendedProblemsCount"] = .int(recommendedProblemsCount)} | ||
| if let recommendedProblemsSolvedCount = recommendedProblemsSolvedCount { self.logData["recommendedProblemsSolvedCount"] = .int(recommendedProblemsSolvedCount)} | ||
| if let problemId = problemId { self.logData["problemId"] = .int(problemId)} | ||
| if let problemCategory = problemCategory { self.logData["problemCategory"] = .string(problemCategory)} | ||
| if let problemQuestion = problemQuestion { self.logData["problemQuestion"] = .string(problemQuestion)} | ||
| if let problemFavorite = problemFavorite { self.logData["problemFavorite"] = .bool(problemFavorite)} | ||
| } | ||
|
|
||
| public class Builder { | ||
| var learningGoal: Int? | ||
| var learningPercent: Float? | ||
| var recommendedProblemsCount: Int? | ||
| var recommendedProblemsSolvedCount: Int? | ||
| var problemId: Int? | ||
| var problemCategory: String? | ||
| var problemQuestion: String? | ||
| var problemFavorite: Bool? | ||
|
|
||
| public init() { } | ||
|
|
||
| public func setLearningGoal(_ learningGoal: Int) -> Builder { | ||
| self.learningGoal = learningGoal | ||
| return self | ||
| } | ||
| public func setLearningPercent(_ learningPercent: Float) -> Builder { | ||
| self.learningPercent = learningPercent | ||
| return self | ||
| } | ||
| public func setRecommendedProblemsCount(_ recommendedProblemsCount: Int) -> Builder { | ||
| self.recommendedProblemsCount = recommendedProblemsCount | ||
| return self | ||
| } | ||
| public func setrecommendedProblemsSolvedCount(_ recommendedProblemsSolvedCount: Int) -> Builder { | ||
| self.recommendedProblemsSolvedCount = recommendedProblemsSolvedCount | ||
| return self | ||
| } | ||
| public func setProblemId(_ problemId: Int) -> Builder { | ||
| self.problemId = problemId | ||
| return self | ||
| } | ||
| public func setProblemCategory(_ problemCategory: String) -> Builder { | ||
| self.problemCategory = problemCategory | ||
| return self | ||
| } | ||
| public func setProblemQuestion(_ problemQuestion: String) -> Builder { | ||
| self.problemQuestion = problemQuestion | ||
| return self | ||
| } | ||
| public func setProblemFavorite(_ problemFavorite: Bool) -> Builder { | ||
| self.problemFavorite = problemFavorite | ||
| return self | ||
| } | ||
| public func build() -> SWMLoggingScheme { | ||
| return LearningHomeSolvingProblemClickedScheme(learningGoal: learningGoal, learningPercent: learningPercent, recommendedProblemsCount: recommendedProblemsCount, recommendedProblemsSolvedCount: recommendedProblemsSolvedCount, problemId: problemId, problemCategory: problemCategory, problemQuestion: problemQuestion, problemFavorite: problemFavorite) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } | ||
|
|
This file contains hidden or 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,57 @@ | ||
| // | ||
| // OrderClickedScheme.swift | ||
| // Domain | ||
| // | ||
| // Created by Lee Myeonghwan on 2023/10/02. | ||
| // Copyright © 2023 com.lito. All rights reserved. | ||
| // | ||
|
|
||
| import Foundation | ||
| import SWMLogging | ||
|
|
||
| public struct OrderClickedScheme: ClickScheme { | ||
|
|
||
| public var eventLogName = "missionClick" | ||
| public var screenName = "SolvingProblemListView" | ||
| public var logVersion = 1 | ||
| public var logData: [String: AnyEncodable] = [:] | ||
|
|
||
| public init(userId: Int?, gender: String?, age: Int?) { | ||
|
|
||
| // logData 만들기 | ||
| self.logData["userId"] = .int(userId ?? -1) | ||
| self.logData["gender"] = .string(gender ?? "") | ||
| self.logData["age"] = .int(age ?? -1) | ||
|
|
||
| } | ||
|
|
||
| public class Builder { | ||
| var userId: Int? | ||
| var gender: String? | ||
| var age: Int? | ||
|
|
||
| public func setGender(gender: String) -> Builder { | ||
| self.gender = gender | ||
| return self | ||
| } | ||
| public func setAge(age: Int) -> Builder { | ||
| self.age = age | ||
| return self | ||
| } | ||
| public func setUserId(userId: Int) -> Builder { | ||
| self.userId = userId | ||
| return self | ||
| } | ||
|
|
||
| public func userId(id: Int) -> Builder { | ||
| self.userId = id | ||
| return self | ||
| } | ||
|
|
||
| public func build() -> SWMLoggingScheme { | ||
| return OrderClickedScheme(userId: userId, gender: gender, age: age) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } | ||
This file contains hidden or 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 hidden or 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.
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.
setUserId 메소드가 필요할거같네요.