Skip to content

MINOR: set log4j.logger.kafka and all Config logger levels to ERROR for Streams tests#11823

Merged
ableegoldman merged 2 commits intoapache:trunkfrom
ableegoldman:MINOR-set-kafka-and-Config-logging-to-ERROR
Mar 2, 2022
Merged

MINOR: set log4j.logger.kafka and all Config logger levels to ERROR for Streams tests#11823
ableegoldman merged 2 commits intoapache:trunkfrom
ableegoldman:MINOR-set-kafka-and-Config-logging-to-ERROR

Conversation

@ableegoldman
Copy link
Copy Markdown
Member

Pretty much any time we have an integration test failure that's flaky or only exposed when running on Jenkins through the PR builds, it's impossible to debug if it cannot be reproduced locally as the logs attached to the test results have truncated the entire useful part of the logs. This is due to the logs being flooded at the beginning of the test when the Kafka cluster is coming up, eating up all of the allotted characters before we even get to the actual Streams test. Setting log4j.logger.kafka to ERROR greatly improves the situation and cuts down on most of the excessive logging in my local runs. To improve things even more and have some hope of getting the part of the logs we actually need, I also set the loggers for all of the Config objects to ERROR, as these print out the value of every single config (of which there are a lot) and are not useful as we can easily figure out what the configs were if necessary by just inspecting the test locally.

Hopefully this will help us debug and then fix some of the flaky tests within Streams that show up on PR builds

Copy link
Copy Markdown
Member

@showuon showuon left a comment

Choose a reason for hiding this comment

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

+1 to reduce the logs for better debugging the flaky tests on jenkins. After all, user can always change the log level when running in local env. Thanks.

Copy link
Copy Markdown
Contributor

@guozhangwang guozhangwang left a comment

Choose a reason for hiding this comment

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

Thanks @ableegoldman . I agree that skipping INFO at kafka server logs is a good idea.

Just one question on one log4j line, otherwise LGTM.


log4j.logger.kafka=INFO
log4j.logger.kafka=ERROR
log4j.logger.state=ERROR
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure what does "log4j.logger.state" mean here? Or did you mean to write "log4j.logger.state.change.logger"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah, yeah, I guess there isn't anything else under log4j.logger.state besides the state.change.logger -- I'll update this

@ableegoldman ableegoldman merged commit f089bea into apache:trunk Mar 2, 2022
@ableegoldman
Copy link
Copy Markdown
Member Author

Merged to trunk -- thanks @showuon and @guozhangwang !

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.

3 participants