-
Notifications
You must be signed in to change notification settings - Fork 506
METRON-633: Create better logging for HbaseEnrichmentWriter #572
Conversation
d42a098 to
7034231
Compare
|
Hey folks, this one has been open for a while. Could I please get some +1's? Thank you! |
|
Can you use parameterized messages for the various log statements or If I recall correctly, typically it's better to use parameterized messages if it's just using the |
|
Agreed with @justinleet about switching away from isDebugEnabled(). Except for instances where you're doing something that has a fair amount of overhead in evaluating the pre-formatted strings, using message parameters is the current recommended approach. Also allow me to plug my PR that normalizes logging across the board - #599 :-) |
| return Collections.emptyList(); | ||
| } | ||
| if(o instanceof String) { | ||
| LOG.debug("Key column: '" + o + "'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to turn this and similar statements into LOG.debug("Key column: '{}'", o );. Per the slf4j docs, this has the potential to improve calls by up to 30x where debugging is not enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks everyone for a great feedback! @justinleet I will rebase once #599 is merged, cheers.
|
Just piling in here and saying thanks @zezutom for the contribution. This looks great! |
|
Thank you @cestella and sorry for the delay, now I am back to it. |
|
@justinleet Will do, thanks for sorting out Travis! |
|
@justinleet I can't merge this PR, do you mind merging to master yourself? Cheers. |
|
+1, thanks again for the contribution. |
Contributor Comments
I have added logging to critical paths, so that issues can be tracked down more easily.
Pull Request Checklist
In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
For all changes:
For code changes:
Have you ensured that the full suite of tests and checks have been executed in the root incubating-metron folder via:
Have you written or updated unit tests and or integration tests to verify your changes?