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

application logger pattern full-replacement support #11291

Closed

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 yjqg6666 marked this pull request as draft July 26, 2024 07:33
Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 4.54545% with 21 lines in your changes missing coverage. Please review.

Project coverage is 36.92%. Comparing base (d9a4836) to head (72b4737).

Files Patch % Lines
...n/log4j2/interceptor/PatternLayoutInterceptor.java 0.00% 17 Missing ⚠️
...navercorp/pinpoint/plugin/log4j2/Log4j2Config.java 20.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #11291      +/-   ##
============================================
- Coverage     36.92%   36.92%   -0.01%     
- Complexity    12073    12074       +1     
============================================
  Files          4011     4011              
  Lines         98255    98271      +16     
  Branches      10416    10420       +4     
============================================
+ Hits          36282    36284       +2     
- Misses        59008    59022      +14     
  Partials       2965     2965              

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

@yjqg6666 yjqg6666 force-pushed the logger-replace-pattern-fully branch from 72b4737 to 860feae Compare July 26, 2024 08:38
@yjqg6666 yjqg6666 closed this Jul 26, 2024
@yjqg6666
Copy link
Contributor Author

Close this PR, use PR #11293 instead.

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
1 participant