TeamAmalgam/kodkod — pull request #22 by mhyee (2013-07-05 13:19:59+00:00)
Title: Use StringBuilder to combine multiline logging

Using `logger.log()` for every single line of multi-line output makes the output really messy.

I changed it to use a StringBuilder to build up the message, and then I output it once.

This changes the logging from

```
FINE: Found a solution. At time: 3, Improving on [76, 85]
Jul 05, 2013 9:18:17 AM kodkod.multiobjective.MetricPoint parametrizedImprovementConstraints
FINE: Possible Improvements are conjunction of
Jul 05, 2013 9:18:17 AM kodkod.multiobjective.MetricPoint parametrizedImprovementConstraints
FINE:	(sum((this/ConcreteKnapsack . this/Knapsack.metric0)) >= 76)
Jul 05, 2013 9:18:17 AM kodkod.multiobjective.MetricPoint parametrizedImprovementConstraints
FINE:	(sum((this/ConcreteKnapsack . this/Knapsack.metric1)) >= 85)
Jul 05, 2013 9:18:17 AM kodkod.multiobjective.MetricPoint parametrizedImprovementConstraints
FINE:	((sum((this/ConcreteKnapsack . this/Knapsack.metric0)) > 76) || (sum((this/ConcreteKnapsack . this/Knapsack.metric1)) > 85))
Jul 05, 2013 9:18:17 AM kodkod.multiobjective.algorithms.IncrementalGuidedImprovementAlgorithm multiObjectiveSolve
FINE: Found Pareto point with values: [76, 85]
Jul 05, 2013 9:18:19 AM kodkod.multiobjective.algorithms.IncrementalGuidedImprovementAlgorithm multiObjectiveSolve
FINE: Magnifying glass found 1 solution(s). At time: 5
Jul 05, 2013 9:18:21 AM kodkod.multiobjective.algorithms.IncrementalGuidedImprovementAlgorithm debugWriteStatistics
FINE: # Sat Call: 14
Jul 05, 2013 9:18:21 AM kodkod.multiobjective.algorithms.IncrementalGuidedImprovementAlgorithm debugWriteStatistics
FINE: # Unsat Call: 2
Jul 05, 2013 9:18:21 AM kodkod.multiobjective.algorithms.IncrementalGuidedImprovementAlgorithm debugWriteStatistics
FINE: Total Time in Sat Calls: 2,806
Jul 05, 2013 9:18:21 AM kodkod.multiobjective.algorithms.IncrementalGuidedImprovementAlgorithm debugWriteStatistics
FINE: Total Time in Sat Calls Solving: 524
Jul 05, 2013 9:18:21 AM kodkod.multiobjective.algorithms.IncrementalGuidedImprovementAlgorithm debugWriteStatistics
FINE: Total Time in Sat Calls Translating: 2,282
Jul 05, 2013 9:18:21 AM kodkod.multiobjective.algorithms.IncrementalGuidedImprovementAlgorithm debugWriteStatistics
FINE: Total Time in Unsat Calls: 1,747
Jul 05, 2013 9:18:21 AM kodkod.multiobjective.algorithms.IncrementalGuidedImprovementAlgorithm debugWriteStatistics
FINE: Total Time in Unsat Calls Solving: 472
Jul 05, 2013 9:18:21 AM kodkod.multiobjective.algorithms.IncrementalGuidedImprovementAlgorithm debugWriteStatistics
FINE: Total Time in Unsat Calls Translating: 1,275
Jul 05, 2013 9:18:21 AM kodkod.multiobjective.algorithms.IncrementalGuidedImprovementAlgorithm debugWriteStatistics
FINE: # Magnifier Sat Call: 1
Jul 05, 2013 9:18:21 AM kodkod.multiobjective.algorithms.IncrementalGuidedImprovementAlgorithm debugWriteStatistics
FINE: # Magnifier Unsat Call: 1
Jul 05, 2013 9:18:21 AM kodkod.multiobjective.algorithms.IncrementalGuidedImprovementAlgorithm debugWriteStatistics
FINE: Total Time in Magnifier: 1,843
```

to

```
```

I also added the logging line: `All Pareto points found. At time: x`

Reviewers: @AtulanZaman @cpkleynhans @joseph2625