Skip to content

Commit

Permalink
Put logs for unsatisfied offers in one line
Browse files Browse the repository at this point in the history
Before, log was spread accross multiple lines, and it was making
investigation very difficult for incidents related to offer matching
  • Loading branch information
Lqp1 committed Feb 2, 2021
1 parent c48b695 commit 833036c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/mesosphere/mesos/ResourceMatcher.scala
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ object ResourceMatcher extends StrictLogging {
// Add constraints to noOfferMatchReasons
noOfferMatchReasons += NoOfferMatchReason.UnfulfilledConstraint
logger.info(
s"Offer [${offer.getId.getValue}] with role [${offer.getAllocationInfo.getRole}]. Constraints for run spec [${runSpec.id}] not satisfied.\n" +
s"The conflicting constraints are: [${badConstraints.mkString(", ")}]"
s"Offer [${offer.getId.getValue}] with role [${offer.getAllocationInfo.getRole}]. Constraints for run spec [${runSpec.id}] not satisfied." +
s"The conflicting constraints are: [${badConstraints.mkString(", ").replaceAll("\n", " ")}]. Agent is ${offer.getHostname}"
)
}

Expand Down

0 comments on commit 833036c

Please sign in to comment.