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

Log messages with partially missing parameters #2380

Closed
ppkarwasz opened this issue Mar 14, 2024 · 2 comments · Fixed by #2393
Closed

Log messages with partially missing parameters #2380

ppkarwasz opened this issue Mar 14, 2024 · 2 comments · Fixed by #2393
Assignees
Labels
api Affects the public API bug Incorrect, unexpected, or unintended behavior of existing code
Milestone

Comments

@ppkarwasz
Copy link
Contributor

Log4j version 2.20.0 did also log messages with missing parameters. A call like:

logger.info("{}, {} and {}", 1, 2);

resulted in a partially replaced message: 1, 2, and {}.

The behavior changed in 2.21.0 and should be restored for backward compatibility.

@ppkarwasz ppkarwasz added this to the 2.24.0 milestone Mar 14, 2024
@ppkarwasz ppkarwasz added the bug Incorrect, unexpected, or unintended behavior of existing code label Mar 14, 2024
@SeasonPanPan
Copy link
Contributor

I will work on this issue #2380 .

@ppkarwasz
Copy link
Contributor Author

Thanks

SeasonPanPan added a commit to SeasonPanPan/logging-log4j2 that referenced this issue Mar 18, 2024
SeasonPanPan added a commit to SeasonPanPan/logging-log4j2 that referenced this issue Mar 19, 2024
SeasonPanPan added a commit to SeasonPanPan/logging-log4j2 that referenced this issue Mar 19, 2024
ppkarwasz pushed a commit that referenced this issue Mar 25, 2024
@vy vy added the api Affects the public API label Mar 25, 2024
LuciferYang pushed a commit to apache/spark that referenced this issue Oct 3, 2024
### What changes were proposed in this pull request?
The pr aims to upgrade log4j2 from `2.22.1` to `2.24.1`.

### Why are the changes needed?
- The full release notes:
https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.24.1
https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.24.0
https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.23.1
https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.23.0

- The new version contains some bug fixes:
Fix regression in JdkMapAdapterStringMap performance. (apache/logging-log4j2#2238)
Fix NPE in PatternProcessor for a UNIX_MILLIS pattern (apache/logging-log4j2#2346)
Fix that parameterized message formatting throws an exception when there are insufficient number of parameters. It previously simply
didn't replace the '{}' sequence. The behavior changed in 2.21.0 and should be restored for backward compatibility. (apache/logging-log4j2#2380)
Fix putAll() in the default thread context map implementation (apache/logging-log4j2#2942)

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

### How was this patch tested?
Pass GA.

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

Closes #48029 from panbingkun/SPARK-49541.

Authored-by: panbingkun <panbingkun@baidu.com>
Signed-off-by: yangjie01 <yangjie01@baidu.com>
attilapiros pushed a commit to attilapiros/spark that referenced this issue Oct 4, 2024
### What changes were proposed in this pull request?
The pr aims to upgrade log4j2 from `2.22.1` to `2.24.1`.

### Why are the changes needed?
- The full release notes:
https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.24.1
https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.24.0
https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.23.1
https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.23.0

- The new version contains some bug fixes:
Fix regression in JdkMapAdapterStringMap performance. (apache/logging-log4j2#2238)
Fix NPE in PatternProcessor for a UNIX_MILLIS pattern (apache/logging-log4j2#2346)
Fix that parameterized message formatting throws an exception when there are insufficient number of parameters. It previously simply
didn't replace the '{}' sequence. The behavior changed in 2.21.0 and should be restored for backward compatibility. (apache/logging-log4j2#2380)
Fix putAll() in the default thread context map implementation (apache/logging-log4j2#2942)

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

### How was this patch tested?
Pass GA.

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

Closes apache#48029 from panbingkun/SPARK-49541.

Authored-by: panbingkun <panbingkun@baidu.com>
Signed-off-by: yangjie01 <yangjie01@baidu.com>
himadripal pushed a commit to himadripal/spark that referenced this issue Oct 19, 2024
### What changes were proposed in this pull request?
The pr aims to upgrade log4j2 from `2.22.1` to `2.24.1`.

### Why are the changes needed?
- The full release notes:
https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.24.1
https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.24.0
https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.23.1
https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.23.0

- The new version contains some bug fixes:
Fix regression in JdkMapAdapterStringMap performance. (apache/logging-log4j2#2238)
Fix NPE in PatternProcessor for a UNIX_MILLIS pattern (apache/logging-log4j2#2346)
Fix that parameterized message formatting throws an exception when there are insufficient number of parameters. It previously simply
didn't replace the '{}' sequence. The behavior changed in 2.21.0 and should be restored for backward compatibility. (apache/logging-log4j2#2380)
Fix putAll() in the default thread context map implementation (apache/logging-log4j2#2942)

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

### How was this patch tested?
Pass GA.

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

Closes apache#48029 from panbingkun/SPARK-49541.

Authored-by: panbingkun <panbingkun@baidu.com>
Signed-off-by: yangjie01 <yangjie01@baidu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Affects the public API bug Incorrect, unexpected, or unintended behavior of existing code
Projects
None yet
3 participants