Skip to content
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

[#11290] Add application logger pattern full-replacement support. #11293

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

yjqg6666
Copy link
Contributor

Fix #11290.

Automatically change logger's pattern with the configured value.

  • log4j
    profiler.log4j.logging.pattern.replace.enable=true
    profiler.log4j.logging.pattern.full_replace.with=TxId:%X{PtxId} %m

  • log4j2
    profiler.log4j2.logging.pattern.replace.enable=true
    profiler.log4j2.logging.pattern.full_replace.with=TxId:%X{PtxId} %msg

  • logback
    profiler.logback.logging.pattern.replace.enable=true
    profiler.logback.logging.pattern.full_replace.with=%d{yyyy-MM-dd HH:mm:ss} [%p] [%t] %c [Txid:%X{PtxId} ReqId:%X{PreqId}] --- %m%n

@yjqg6666
Copy link
Contributor Author

@emeroad This feature has been completed. PTAL.

@yjqg6666 yjqg6666 requested a review from emeroad July 26, 2024 08:46
Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 5.00000% with 19 lines in your changes missing coverage. Please review.

Project coverage is 36.23%. Comparing base (d9a4836) to head (860feae).
Report is 273 commits behind head on master.

Files with missing lines Patch % Lines
...n/log4j2/interceptor/PatternLayoutInterceptor.java 0.00% 15 Missing ⚠️
...navercorp/pinpoint/plugin/log4j2/Log4j2Config.java 20.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #11293      +/-   ##
============================================
- Coverage     36.92%   36.23%   -0.70%     
- Complexity    12073    12753     +680     
============================================
  Files          4011     4159     +148     
  Lines         98255   106522    +8267     
  Branches      10416    11535    +1119     
============================================
+ Hits          36282    38596    +2314     
- Misses        59008    64850    +5842     
- Partials       2965     3076     +111     

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

@yjqg6666 yjqg6666 changed the title Add application logger pattern full-replacement support. [#11290] Add application logger pattern full-replacement support. Jul 26, 2024
@yjqg6666 yjqg6666 closed this Nov 6, 2024
@emeroad emeroad reopened this Nov 7, 2024
@emeroad
Copy link
Member

emeroad commented Nov 7, 2024

We plan to review this PR.

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.

[PR] application logger pattern full-replacement support
2 participants