Skip to content

fix(yahcli): restore log output by bundling a dedicated log4j2 config#25131

Open
Chinnmay wants to merge 2 commits intohiero-ledger:mainfrom
Chinnmay:fix-yahcli-log4j-config
Open

fix(yahcli): restore log output by bundling a dedicated log4j2 config#25131
Chinnmay wants to merge 2 commits intohiero-ledger:mainfrom
Chinnmay:fix-yahcli-log4j-config

Conversation

@Chinnmay
Copy link
Copy Markdown
Contributor

Summary

Yahcli was producing zero log output in preprod.

Root cause: The shadow jar bundles four log4j2 configs from transitive deps. Log4j2's auto-discovery picks the canonical filename log4j2.xml, which is the one shipped by swirlds-platform-core
and it sets <Root level="off">.

Fix

  • Add src/main/resources/log4j2-yahcli.xml — Console + RollingFile, root INFO.
  • Add src/main/resources/log4j2.component.properties — pins log4j2 to the new config.
  • build.gradle.kts: exclude the four stale transitive configs (log4j2.xml, log4j2-test-client.xml, log4j2-JRS.xml, regression-log4j2.xml) from the shadow jar.

No launcher/Dockerfile changes.

@Chinnmay Chinnmay requested review from a team as code owners April 27, 2026 20:03
@Chinnmay Chinnmay requested a review from leninmehedy April 27, 2026 20:03
@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented Apr 27, 2026

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@lfdt-bot
Copy link
Copy Markdown

lfdt-bot commented Apr 27, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 27, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@Chinnmay Chinnmay self-assigned this Apr 27, 2026
@Chinnmay Chinnmay force-pushed the fix-yahcli-log4j-config branch from 5e45c02 to dad52ae Compare April 27, 2026 20:11
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #25131   +/-   ##
=========================================
  Coverage     74.92%   74.92%           
  Complexity    11525    11525           
=========================================
  Files          2587     2587           
  Lines        100289   100289           
  Branches      11088    11087    -1     
=========================================
  Hits          75137    75137           
  Misses        21342    21342           
  Partials       3810     3810           

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mhess-swl mhess-swl linked an issue Apr 27, 2026 that may be closed by this pull request
15 tasks
Copy link
Copy Markdown
Contributor

@mhess-swl mhess-swl left a comment

Choose a reason for hiding this comment

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

Just had one thought, otherwise looks good!

Comment thread hedera-node/yahcli/src/main/resources/log4j2-yahcli.xml Outdated
@Chinnmay Chinnmay requested a review from mhess-swl April 27, 2026 21:25
Copy link
Copy Markdown
Contributor

@mhess-swl mhess-swl left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @Chinnmay! 🙏

Signed-off-by: chinnmay <sarvasvachaudhari55555@gmail.com>
… with <tc>

Signed-off-by: chinnmay <sarvasvachaudhari55555@gmail.com>
@Chinnmay Chinnmay force-pushed the fix-yahcli-log4j-config branch from 8b9d8ca to 3d00e10 Compare April 30, 2026 21:06
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.

Add client log file for yahcli ivy

3 participants