Skip to content

[#1385] improvement: Improve log4j appender layout pattern - #1386

Merged
zuston merged 1 commit into
apache:masterfrom
rickyma:better-log4j-layout-pattern
Dec 27, 2023
Merged

[#1385] improvement: Improve log4j appender layout pattern#1386
zuston merged 1 commit into
apache:masterfrom
rickyma:better-log4j-layout-pattern

Conversation

@rickyma

@rickyma rickyma commented Dec 19, 2023

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Improve the log4j appender layout pattern, by adding the full logger name and code line number.

Why are the changes needed?

For #1385

Does this PR introduce any user-facing change?

No.

How was this patch tested?

By running the process successfully and check the log4j output.

@rickyma

rickyma commented Dec 19, 2023

Copy link
Copy Markdown
Contributor Author

PTAL @jerqi

@codecov-commenter

codecov-commenter commented Dec 19, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b7962b1) 53.22% compared to head (731e39f) 54.11%.
Report is 6 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1386      +/-   ##
============================================
+ Coverage     53.22%   54.11%   +0.89%     
- Complexity     2718     2720       +2     
============================================
  Files           419      399      -20     
  Lines         23985    21633    -2352     
  Branches       2049     2051       +2     
============================================
- Hits          12765    11707    -1058     
+ Misses        10432     9208    -1224     
+ Partials        788      718      -70     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

roryqi
roryqi previously approved these changes Dec 20, 2023

@roryqi roryqi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. thanks @rickyma

@zuston

zuston commented Dec 20, 2023

Copy link
Copy Markdown
Member

I will -1 for this PR, the line number will drop huge performance. And I don't think the line number is necessary for the log.

@rickyma

rickyma commented Dec 20, 2023

Copy link
Copy Markdown
Contributor Author

@zuston You're right. I'll remove the line number. Any other suggestions here? Thanks.

@zuston

zuston commented Dec 20, 2023

Copy link
Copy Markdown
Member

Can you give the comparison logs of after and before this patch ? @rickyma

@roryqi roryqi changed the title [#1385] [Improvement] Improve log4j appender layout pattern [#1385] improvement: Improve log4j appender layout pattern Dec 20, 2023
@rickyma
rickyma force-pushed the better-log4j-layout-pattern branch 6 times, most recently from c794656 to dbed737 Compare December 22, 2023 17:17
@rickyma

rickyma commented Dec 22, 2023

Copy link
Copy Markdown
Contributor Author

PTAL @zuston

Before this patch:
[INFO] 2023-12-23 01:09:36,830 main ShuffleServer start - Shuffle server start successfully!

After this patch:
[2023-12-23 01:09:36.830] [main] [INFO] org.apache.uniffle.server.ShuffleServer.start - Shuffle server start successfully!

Also, I think the default MaxFileSize 50MB is too small, wouldn't it be better to set it to maybe 2GB?

@zuston

zuston commented Dec 25, 2023

Copy link
Copy Markdown
Member

Before this patch:
[INFO] 2023-12-23 01:09:36,830 main ShuffleServer start - Shuffle server start successfully!

After this patch:
[2023-12-23 01:09:36.830] [main] [INFO] org.apache.uniffle.server.ShuffleServer.start - Shuffle server start successfully!

I think the original log is enough, too long package name is not necessary that will occupy too much space

Also, I think the default MaxFileSize 50MB is too small, wouldn't it be better to set it to maybe 2GB?

This is OK for me.

@rickyma
rickyma force-pushed the better-log4j-layout-pattern branch from dbed737 to 731e39f Compare December 26, 2023 11:34
@rickyma

rickyma commented Dec 26, 2023

Copy link
Copy Markdown
Contributor Author

Updated. PTAL @zuston

Before this patch:
[INFO] 2023-12-23 01:09:36,830 main ShuffleServer start - Shuffle server start successfully!
MaxFileSize = 50MB

After this patch:
[2023-12-23 01:09:36.830] [main] [INFO] ShuffleServer.start - Shuffle server start successfully!
MaxFileSize = 2GB

@zuston zuston left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks for your contribution @rickyma

@roryqi roryqi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

@zuston
zuston merged commit 249c737 into apache:master Dec 27, 2023
zuston pushed a commit to zuston/incubator-uniffle that referenced this pull request Dec 31, 2023
…che#1386)

### What changes were proposed in this pull request?

Improve the log4j appender layout pattern, by adding the full logger name and code line number.

### Why are the changes needed?

For [apache#1385](apache#1385)

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

By running the process successfully and check the log4j output.
@rickyma
rickyma deleted the better-log4j-layout-pattern branch May 5, 2024 08:34
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.

4 participants