-
Notifications
You must be signed in to change notification settings - Fork 158
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
Fix LowestAddressJoinDecider cluster formation warning log to not depend on INFO logging level being set #647
Fix LowestAddressJoinDecider cluster formation warning log to not depend on INFO logging level being set #647
Conversation
94c5a48
to
b86f78c
Compare
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.
Makes sense. Thanks for that @dope9967
I'm removing my review. I have missed something, see comments.
...er-bootstrap/src/main/scala/akka/management/cluster/bootstrap/LowestAddressJoinDecider.scala
Outdated
Show resolved
Hide resolved
…end on INFO logging level being set
eb2c326
to
c48cdb8
Compare
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.
@dope9967, this is in the right direction. I left a minor change request.
I think the right conditional will be:
if (settings.newClusterEnabled) {
if (log.isInfoEnabled) {
// do info logging
}
} else {
// do warn logging
}
@@ -74,7 +74,8 @@ class LowestAddressJoinDecider(system: ActorSystem, settings: ClusterBootstrapSe | |||
lowestAddress.map(contactPointString).getOrElse(""), | |||
info.contactPoints.map(contactPointString).mkString(", ") | |||
) | |||
else | |||
} else { | |||
if (log.isWarningEnabled) |
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.
Strictly speaking, checking if warning logging is enabled is not that useful. Warn logging is often enable so the chances of optimisation are minimal here. That's much different that info
and debug
. Those are the levels that are in practice tweaked by users.
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.
Makes sense.
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.
Anyway, not a big issue and I think it's ok to leave like that. That was just a side comment.
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.
LGTM, thanks!
The build failure is because we test against the latest version of k8s with minikube and the install for that no longer works. I'll fix that under a separate issue. |
The failure is unrelated and fixed on master |
Issue is quite self explanatory - I can't see a good reason to have an important warning log to be disabled by not setting logging level to INFO.
References #645