-
Notifications
You must be signed in to change notification settings - Fork 1
ci: 로깅 설정 및 zipkin 설정 추가 / #51 #52
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||
| <configuration> | ||||||
| <property name="LOG_PATTERN" | ||||||
| value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - [traceId=%X{traceId}, spanId=%X{spanId}] %msg%n"/> | ||||||
| <property name="ACTIVE_LOG" value="/logs/application.log"/> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 로그 파일 경로에 절대 경로('/logs/application.log')를 사용하면 권한 문제나 이식성 문제가 발생할 수 있습니다. 애플리케이션 실행 위치 기준으로 로그 파일이 생성되도록 상대 경로('logs/application.log')를 사용하는 것이 좋습니다. 또한, 현재 설정에서는 활성 로그 파일(
Suggested change
|
||||||
|
|
||||||
| <!-- 콘솔 출력 --> | ||||||
| <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | ||||||
| <encoder> | ||||||
| <pattern>${LOG_PATTERN}</pattern> | ||||||
| </encoder> | ||||||
| </appender> | ||||||
|
|
||||||
| <!-- 파일 출력 --> | ||||||
| <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||||||
| <file>${ACTIVE_LOG}</file> | ||||||
| <append>true</append> | ||||||
| <!-- 날짜+용량 기준 롤링 권장 --> | ||||||
| <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | ||||||
| <!-- 아카이브 파일 경로 --> | ||||||
| <fileNamePattern>logs/application.%d{yyyy-MM-dd}.%i.log</fileNamePattern> | ||||||
| <maxFileSize>100MB</maxFileSize> | ||||||
| <!-- 총 보관 용량 한도 --> | ||||||
| <totalSizeCap>512MB</totalSizeCap> | ||||||
| <!-- 보관 일수 --> | ||||||
| <maxHistory>3</maxHistory> | ||||||
| </rollingPolicy> | ||||||
| <encoder> | ||||||
| <pattern>${LOG_PATTERN}</pattern> | ||||||
| </encoder> | ||||||
| </appender> | ||||||
|
|
||||||
| <root level="INFO"> | ||||||
| <appender-ref ref="CONSOLE"/> | ||||||
| <appender-ref ref="FILE"/> | ||||||
| </root> | ||||||
| </configuration> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
파일의 마지막에 개행 문자를 추가하는 것을 권장합니다. 이는 텍스트 파일에 대한 POSIX 표준이며, Git과 같은 버전 관리 시스템이나 다른 텍스트 처리 도구와의 호환성을 높여줍니다.