Skip to content
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

[IDLE-000] 로깅전송 객체 리팩토링 #97

Merged
merged 11 commits into from
Oct 30, 2024
Merged

Conversation

J0onYEong
Copy link
Contributor

변경된 점

  • 로깅정보를 담은 객체를 생성하고 전송하는 방법 리팩토링

로깅정보를 담은 객체를 생성하고 전송하는 방법 리팩토링

기존에 인터페이스로 분리된 로깅객체를 하나의 로깅객체를 두고 다양한 로깅오브젝트를 두는 것으로 변경했습니다.

  • 빌더오브젝트를 사용한 이유

로깅 오브젝트를 사용하는 것만으로 충분하지 않은가?

  • 오브젝트 빌더를 사용하여 로깅하려는 객체가 보유한 프로퍼티를 가시적으로 들어날 수 있도록했다.
    ※ 로깅객체의 생성자의 접근 지정자를 internal로 제한하여 빌더를 통해서만 생성할 수 있도록 했다.

로깅객체를 사용하지말고 딕셔너리를 바로 사용하면 안되는지?

  • 특정 프로토콜을 따르는 별도의 객체를 둠으로써, 예상치못한 값이 로깅되는 문제를 예방할 수 있다.
  • 객체 프로퍼티의 접근 지정자를 설정하여, 객체가 생성완료 시점이후부터 불변성을 보장받을 수 있도록 할 수 있다.

빌더 프로토콜을 사용한 이유?

  • 빌더를 프로토콜화 하여 어떤 종류에 로깅오브젝트가 있는지 가식적으로 확인할 수 있도록 했다.
스크린샷 2024-10-31 오전 12 21 01

@J0onYEong J0onYEong merged commit ad4cee2 into develop Oct 30, 2024
1 check failed
@J0onYEong J0onYEong deleted the refactor/log_system branch October 30, 2024 15:30
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.

1 participant