Skip to content

Conversation

@Finefinee
Copy link
Contributor

No description provided.

@Finefinee Finefinee merged commit bc90e95 into develop Dec 9, 2025
1 check passed
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Finefinee, 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!

This pull request primarily focuses on refining the application's error handling and logging infrastructure. It introduces robust file-based logging using Logback, enhances the global exception handler with detailed logging for various error types, and makes error messages more flexible. Additionally, it adjusts the Member entity to allow for optional email addresses and cleans up an obsolete configuration entry, contributing to a more stable and maintainable codebase.

Highlights

  • Error Handling & Logging: Enhanced the global exception handler with SLF4J logging, adding specific log levels for custom exceptions, validation errors, type mismatches, and critical unhandled exceptions to improve observability.
  • Member Entity Update: The 'email' field in the Member entity has been made optional by removing the @NotBlank annotation and nullable = false constraint.
  • Dynamic Error Messages: The INVALID_INPUT_VALUE error message in CommonError now supports dynamic formatting, allowing for more descriptive validation feedback.
  • Logback Configuration: Introduced a new logback-spring.xml file to configure file-based logging, including daily rolling log files and a 30-day retention policy, with logs directed to /home/ubuntu/logs.
  • Configuration Cleanup: Removed the unused app.admin.email property from application-dev.yml.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/deploy.yml
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
Contributor

@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

이 PR은 SLF4J와 Logback을 사용하여 로깅 기능을 도입하고, 예외 처리에 로깅을 포함하도록 리팩토링했습니다. 또한 Member 엔티티의 email 필드를 선택 사항으로 변경했습니다. 전반적으로 좋은 변경 사항이지만, 몇 가지 개선점을 제안합니다.

주요 피드백:

  • logback-spring.xml에서 로그 경로가 하드코딩되어 있어 이식성이 떨어질 수 있습니다. 상대 경로를 사용하도록 수정하는 것이 좋습니다.
  • GlobalExceptionHandler.java의 에러 로그 메시지에서 이모지를 제거하여 로그 파서와의 호환성 문제를 방지하는 것이 좋습니다.

자세한 내용은 각 파일의 개별 코멘트를 확인해주세요.

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="LOG_PATH" value="/home/ubuntu/logs"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

high

로그 경로를 /home/ubuntu/logs로 하드코딩하면 다른 환경에서 애플리케이션을 실행할 때 문제가 발생할 수 있습니다. 예를 들어, 해당 경로가 없거나 쓰기 권한이 없을 수 있습니다. 이식성을 높이기 위해 상대 경로(예: logs)를 사용하거나 환경 변수를 통해 경로를 설정하는 것을 고려해보세요.

Suggested change
<property name="LOG_PATH" value="/home/ubuntu/logs"/>
<property name="LOG_PATH" value="logs"/>

// 그 외 모든 예외 처리
@ExceptionHandler(Exception.class)
public ResponseEntity<ApiResponse<Void>> handleException(Exception e) {
log.error("🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 Unhandled Exception occurred: ", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

로그 메시지에 이모지를 사용하는 것은 일부 로그 집계 시스템이나 터미널에서 문제를 일으킬 수 있습니다. 호환성을 위해 일반 텍스트를 사용하는 것이 좋습니다.

Suggested change
log.error("🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 Unhandled Exception occurred: ", e);
log.error("Unhandled Exception occurred: ", e);

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.

2 participants