Skip to content

[#138] 앱델리의 print 문을 Logger로 대체한다#152

Merged
opficdev merged 1 commit intodevelopfrom
feat/#138-Logger
Feb 27, 2026
Merged

[#138] 앱델리의 print 문을 Logger로 대체한다#152
opficdev merged 1 commit intodevelopfrom
feat/#138-Logger

Conversation

@opficdev
Copy link
Owner

@opficdev opficdev self-assigned this Feb 27, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 풀 리퀘스트는 AppDelegate 파일의 로깅 방식을 표준화하여 애플리케이션의 디버깅 및 유지보수성을 향상시키는 것을 목표로 합니다. 기존의 print 문을 전용 Logger 인스턴스로 교체함으로써, 로그 메시지의 구조화 및 분류가 용이해지고, 불필요한 Combine 임포트를 제거하여 코드의 간결성을 높였습니다.

Highlights

  • 로깅 시스템 개선: AppDelegate 파일 내의 모든 print 문을 Logger 인스턴스를 사용하도록 대체하여 일관된 로깅 방식을 적용했습니다.
  • 불필요한 임포트 제거: AppDelegate에서 사용되지 않는 Combine 프레임워크 임포트를 제거했습니다.
Changelog
  • DevLog/App/Delegate/AppDelegate.swift
    • Combine 임포트가 제거되었습니다.
    • AppDelegate 클래스에 Logger 인스턴스가 추가되었습니다.
    • 알림 권한 요청, APNs 토큰 등록/실패, FCM 토큰 갱신, 시간대 업데이트 실패, 포그라운드 알림, 탭된 알림 처리 등 여러 지점에서 print 문이 logger.error 또는 logger.info 호출로 대체되었습니다.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

print 문을 Logger로 대체하여 로깅 시스템을 개선한 좋은 변경입니다. 이를 통해 로그를 체계적으로 관리하고 디버깅 효율을 높일 수 있습니다. 코드 가독성 및 안정성 향상을 위한 몇 가지 제안 사항을 추가했습니다.

didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data
) {
print("APNs token: \(deviceToken.map { String(format: "%02.2hhx", $0) }.joined())")
logger.info("APNs token: \(deviceToken.map { String(format: "%02.2hhx", $0) }.joined())")

Choose a reason for hiding this comment

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

medium

Data를 hex string으로 변환하는 로직을 Data의 extension으로 분리하여 재사용성과 가독성을 높이는 것을 제안합니다.

예를 들어, 다음과 같은 extension을 추가할 수 있습니다.

extension Data {
    var hexString: String {
        map { String(format: "%02.2hhx", $0) }.joined()
    }
}

이렇게 하면 코드가 더 간결해지고 다른 곳에서도 이 로직을 쉽게 재사용할 수 있습니다.

Suggested change
logger.info("APNs token: \(deviceToken.map { String(format: "%02.2hhx", $0) }.joined())")
logger.info("APNs token: \(deviceToken.hexString)")

@opficdev opficdev merged commit 2a5a1e2 into develop Feb 27, 2026
1 check passed
@opficdev opficdev deleted the feat/#138-Logger branch February 27, 2026 03:11
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.

앱델리의 print 문을 Logger로 대체한다

1 participant