Skip to content

Commit

Permalink
[IDLE-000] 빌더 프로토콜 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
J0onYEong committed Oct 30, 2024
1 parent 8d4238f commit 9a55786
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public struct AccountRegisterationLogObject: LoggingObject {
}
}

public class AccountRegisterationLogBuilder {
public class AccountRegisterationLogBuilder: LogObjectBuilder {

let step: Int
let stepName: String
Expand All @@ -37,7 +37,7 @@ public class AccountRegisterationLogBuilder {
self.stepName = stepName
}

public func build() -> AccountRegisterationLogObject {
.init(step: step, stepName: stepName)
public func build() -> LoggingObject {
AccountRegisterationLogObject(step: step, stepName: stepName)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public struct CreatePostLogObject: LoggingObject {
}
}

public class CreatePostLogBuilder {
public class CreatePostLogBuilder: LogObjectBuilder {

let step: Int
let stepName: String
Expand All @@ -37,7 +37,7 @@ public class CreatePostLogBuilder {
self.stepName = stepName
}

public func build() -> CreatePostLogObject {
.init(step: step, stepName: stepName)
public func build() -> LoggingObject {
CreatePostLogObject(step: step, stepName: stepName)
}
}
14 changes: 14 additions & 0 deletions project/Projects/Module/Logger/Sources/LogObjectBuilder.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// LogObjectBuilder.swift
// Logger
//
// Created by choijunios on 10/31/24.
//

import Foundation

public protocol LogObjectBuilder {

/// 로깅 오브젝트를 생성한다.
func build() -> LoggingObject
}

0 comments on commit 9a55786

Please sign in to comment.