-
Notifications
You must be signed in to change notification settings - Fork 381
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
1.修改日志滚动策略逻辑: #529
base: master
Are you sure you want to change the base?
1.修改日志滚动策略逻辑: #529
Conversation
1.1: TimedRollingFileAppender新增方法 resetTimedRollingFilleConfig(String datePattern),可根据日志滚动策略对日志进行动态配置 1.2: LoadTestAwareAppender 新增rest方法,根据日期策略重置nonLoadTestTraceAppender和loadTestTraceAppender
WalkthroughThe Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- tracer-core/src/main/java/com/alipay/common/tracer/core/appender/file/LoadTestAwareAppender.java (1 hunks)
- tracer-core/src/main/java/com/alipay/common/tracer/core/appender/file/TimedRollingFileAppender.java (1 hunks)
Additional comments not posted (6)
tracer-core/src/main/java/com/alipay/common/tracer/core/appender/file/LoadTestAwareAppender.java (5)
25-26
: Change Approved: ReplaceTraceAppender
withTimedRollingFileAppender
The replacement of
TraceAppender
withTimedRollingFileAppender
aligns with the new logging strategy.
28-29
: Change Approved: Constructor UpdateThe constructor now initializes
TimedRollingFileAppender
instances, which is consistent with the new logging strategy.
36-39
: Change Approved: Creation Method UpdateThe creation method now initializes
TimedRollingFileAppender
instances, which is consistent with the new logging strategy.
46-49
: Change Approved: Creation Method Update with ParametersThe creation method now initializes
TimedRollingFileAppender
instances with additional parameters, which is consistent with the new logging strategy.
75-77
: Change Approved: Newreset
MethodThe new
reset
method correctly resets the configuration ofTimedRollingFileAppender
instances.tracer-core/src/main/java/com/alipay/common/tracer/core/appender/file/TimedRollingFileAppender.java (1)
134-143
: Change Approved: NewresetTimedRollingFileConfig
MethodThe new method correctly resets the configuration based on a specified date pattern and recalculates the next check time for file rolling.
public final class LoadTestAwareAppender implements TraceAppender { | ||
private TimedRollingFileAppender nonLoadTestTraceAppender; | ||
private TimedRollingFileAppender loadTestTraceAppender; |
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.
把注释都加回来
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.
注释还原了
+ File.separator | ||
+ logName, append); | ||
TimedRollingFileAppender nonLoadTestTraceAppender = new TimedRollingFileAppender(logName, | ||
append); |
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.
代码格式有问题?
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.
我这个是idea格式化之后的代码,要不要还原成和之前一样的格式
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- tracer-core/src/main/java/com/alipay/common/tracer/core/appender/file/LoadTestAwareAppender.java (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- tracer-core/src/main/java/com/alipay/common/tracer/core/appender/file/LoadTestAwareAppender.java
1.1: TimedRollingFileAppender新增方法 resetTimedRollingFilleConfig(String datePattern),可根据日志滚动策略对日志进行动态配置
1.2: LoadTestAwareAppender 新增rest方法,根据日期策略重置nonLoadTestTraceAppender和loadTestTraceAppender
Motivation:
Explain the context, and why you're making that change.
To make others understand what is the problem you're trying to solve.
Modification:
Describe the idea and modifications you've done.
Result:
Fixes #.
If there is no issue then describe the changes introduced by this PR.
Summary by CodeRabbit