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

[SPARK-47671][Core] Enable structured logging in log4j2.properties.template and update docs #46349

Closed
wants to merge 4 commits into from

Conversation

gengliangwang
Copy link
Member

What changes were proposed in this pull request?

  • Rename the current log4j2.properties.template as log4j2.properties.pattern-layout-template
  • Enable structured logging in log4j2.properties.template
  • Update configuration.md on how to configure logging

Why are the changes needed?

Providing a structured logging template and document how to configure loggings in Spark 4.0.0

Does this PR introduce any user-facing change?

No

How was this patch tested?

Manual test

Was this patch authored or co-authored using generative AI tooling?

No

@gengliangwang
Copy link
Member Author

cc @dtenedor @panbingkun as well.


To implement structured logging, start with the `log4j2.properties.template` file.

## Plain Text Logging
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for providing this section together.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM.

@gengliangwang
Copy link
Member Author

@dongjoon-hyun I double checked and removed some comments. PTAL, thanks!

@dongjoon-hyun
Copy link
Member

Thank you. Merged to master, @gengliangwang !

JacobZheng0927 pushed a commit to JacobZheng0927/spark that referenced this pull request May 11, 2024
…mplate and update docs

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

- Rename the current log4j2.properties.template as log4j2.properties.pattern-layout-template
- Enable structured logging in log4j2.properties.template
- Update `configuration.md` on how to configure logging

### Why are the changes needed?

Providing a structured logging template and document how to configure loggings in Spark 4.0.0

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

No

### How was this patch tested?

Manual test

### Was this patch authored or co-authored using generative AI tooling?

No

Closes apache#46349 from gengliangwang/logTemplate.

Authored-by: Gengliang Wang <gengliang@apache.org>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants