Skip to content

[feat] 로깅 1차 구현 - #83

Open
Gobans wants to merge 12 commits into
developfrom
feat/logging
Open

[feat] 로깅 1차 구현#83
Gobans wants to merge 12 commits into
developfrom
feat/logging

Conversation

@Gobans

@Gobans Gobans commented Oct 3, 2023

Copy link
Copy Markdown
Contributor

작업내용

  • 로깅 구현

Comment thread Projects/App/Sources/LitoApp.swift Outdated
private let injector: Injector
@ObservedObject private var coordinator: Coordinator
@ObservedObject private var toastHelper: ToastHelper
private let logger: SWMLogger

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

필드변수로 빠져있어야할 필요가 있을까요~?

Comment on lines +33 to +37
public init(userId: Int? = nil, gender: String? = nil, age: Int? = nil) {
self.userId = userId
self.gender = gender
self.age = age
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builder쪽에는 init 메소드가 필요없지 않을까요?

public func setAge(age: Int) -> Builder {
self.age = age
return self
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setUserId 메소드가 필요할거같네요.

Comment on lines +51 to +55
let loggingAPI = LoggingAPI(
serverUrl: serverUrl,
serverPath: serverPath,
authorization: authorization,
scheme: scheme)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoggingAPI객체를 하나를 만들고 각 logging마다 scheme만 갈아끼우는 방식으로 매번 메모리를 할당하는 것이 아닌 한번 만들어진 LoggingAPI인스턴스만 재활용해서 쓰는게 좋을거같아요.

private let moyaProvider = MoyaProvider<LoggingAPI>()
private var cancelBag = Set<AnyCancellable>()

public init(serverUrl: String, serverPath: String, OSNameAndVersion: String) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기에 앱 실행타임에 UUID / AppVersion도 넣어서 OSNameAndVersion과 같은 MadatoryProperty도 넣어줄수 있을까요?

UUID 만드는방법 : https://medium.com/@jang.wangsu/ios-swift-uuid%EB%8A%94-%EC%96%B4%EB%96%A4-%EC%9B%90%EB%A6%AC%EB%A1%9C-%EB%A7%8C%EB%93%A4%EC%96%B4%EC%A7%80%EB%8A%94-%EA%B2%83%EC%9D%BC%EA%B9%8C-22ec9ff4e792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants