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

logger.SetCallerSkip() #7

Merged
merged 1 commit into from
May 1, 2023
Merged

logger.SetCallerSkip() #7

merged 1 commit into from
May 1, 2023

Conversation

jmnote
Copy link
Contributor

@jmnote jmnote commented May 1, 2023

What this PR does / why we need it (변경 내용 / 필요성):

현재 callerSkip9로 고정되어 있는데,
환경에 따라 맞지 않는 현상이 있었으며, go test에서는 9이, 라이브러리로서 사용할 때는 10이 적절한 것 같습니다.
상황에 따라 적절히 값을 설정할 수 있도록 logger.SetCallerSkip(skip int)을 도입하고자 합니다.

기본값은 10으로 하고, 테스트코드에서는 9를 사용하도록 하였습니다. ★

merge 후에는 v0.1.4-beta.0로 release하겠습니다.

Which issue(s) this PR fixes (관련 이슈):

Special notes for your reviewer (리뷰어에게 하고 싶은 말):

리뷰 감사합니다.

Additional documentation, usage docs, etc. (기타 관련 문서, 사용법 등):

@jmnote jmnote added the bug Something isn't working label May 1, 2023
@jmnote jmnote self-assigned this May 1, 2023
@jmnote jmnote linked an issue May 1, 2023 that may be closed by this pull request
@jmnote
Copy link
Contributor Author

jmnote commented May 1, 2023

coverage/coveralls — First build on 6-logger-setcallerskip at 100.0%

@jmnote jmnote requested a review from dozer-jang May 1, 2023 07:45
@jmnote jmnote merged commit 4fd46e8 into main May 1, 2023
@jmnote jmnote deleted the 6-logger-setcallerskip branch May 1, 2023 07:46
@jmnote
Copy link
Contributor Author

jmnote commented May 1, 2023

곧바로 사용하기 위해 approve를 기다리지 않고 squash and merge하였습니다. 리뷰 감사합니다. ㅎㅎ

@jmnote
Copy link
Contributor Author

jmnote commented May 1, 2023

기본값 callerSkip=10 적용 후, venti 쪽에서 common logger의 버전을 올리고 테스트해보니, logger.go 대신 alerter.go와 같이 정상적으로 로그가 나오는 것을 확인하였습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logger.SetCallerSkip()
1 participant