-
Notifications
You must be signed in to change notification settings - Fork 257
[query] use log4j-api-scala for string interpolation #15181
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
Open
ehigham
wants to merge
1
commit into
ehigham/experimental-init
Choose a base branch
from
ehigham/log4j-api-scala
base: ehigham/experimental-init
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+351
−408
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merged
fb70546 to
48f939c
Compare
6412c86 to
6b96148
Compare
6d112eb to
928f7e9
Compare
51de23d to
ab95499
Compare
928f7e9 to
f5248ee
Compare
ab95499 to
ae40002
Compare
f5248ee to
aa4f644
Compare
aa4f644 to
7b5f5aa
Compare
70430b3 to
1e2c06e
Compare
7df0197 to
a5a2ce2
Compare
1e2c06e to
92e19fc
Compare
a5a2ce2 to
1688481
Compare
92e19fc to
53a9a24
Compare
1688481 to
892768c
Compare
00e81ae to
68c71a3
Compare
68c71a3 to
b05bdc9
Compare
892768c to
efca829
Compare
b05bdc9 to
bf6e025
Compare
efca829 to
6fdd548
Compare
bf6e025 to
a6c8816
Compare
a6c8816 to
f70eee1
Compare
6fdd548 to
c3f9ff5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Readers are encouraged to read the log4j documentation on performance considerations. This change is motivated by a number of the issues discussed therein.
We do a lot of string interpolation in logs which isn't great as these logging APIs use call by ref instead of call by name.
log4j-api-scala uses macros to transform string-interpolated log statements into efficient java versions, making sure we're not building strings needlessly.
Their doc suggests inheriting from
Logging and using the protectedlogger field. One benefit of doing things this way is that logs contain the name of the enclosing class without analysing the call stack. I find it much easier to find where a log statement was generated within the source code as a result.The trouble with this
Logging trait is that theloggeris not reconfigurable for reasons I'm yet to fully understand. I think it has something to do with specifying the class loader to log4j'sLoggingFactory..? Anyway, I repurposed ourLogging trait to provide the protectedlogger member that is reconfigurable.This change cannot impact the Hail Batch instance deployed by Broad Institute in GCP