Skip to content

Commit 051606f

Browse files
Core Solver - Console Logging - Add big line separator.
1 parent 0c42c00 commit 051606f

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/mmSolver/adjust/adjust_base.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,9 +1124,7 @@ MStatus solveFrames(
11241124

11251125
auto frameCount = frameList.length();
11261126
if (logLevel >= LOG_LEVEL_PRINT_SOLVER_HEADER_EXTENDED) {
1127-
MMSOLVER_MAYA_INFO(
1128-
"------------------------------------------------------------------"
1129-
"-------------");
1127+
console_log_separator_line();
11301128
MMSOLVER_MAYA_INFO("Solving...");
11311129
MMSOLVER_MAYA_INFO("Solver Type=" << solverOptions.solverType);
11321130
MMSOLVER_MAYA_INFO("Maximum Iterations=" << solverOptions.iterMax);
@@ -1151,9 +1149,7 @@ MStatus solveFrames(
11511149
MMSOLVER_MAYA_INFO("Valid Frames:" << ss.str());
11521150
} else if (!out_cmdResult.printStats.doNotSolve &&
11531151
(logLevel >= LOG_LEVEL_PRINT_SOLVER_HEADER_BASIC)) {
1154-
MMSOLVER_MAYA_INFO(
1155-
"------------------------------------------------------------------"
1156-
"-------------");
1152+
console_log_separator_line();
11571153
MMSOLVER_MAYA_INFO("Solving...");
11581154
MMSOLVER_MAYA_INFO("Marker count: " << usedMarkerList.size());
11591155
MMSOLVER_MAYA_INFO("Attribute count: " << usedAttrList.size());

src/mmSolver/adjust/adjust_consoleLogging.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ const char *const CONSOLE_LOG_SOLVER_ITERATION_RESIDUAL_ERROR_FORMAT =
4444
" | error avg %8.4f min %8.4f max %8.4f";
4545
const char *const CONSOLE_LOG_SOLVER_END_RESIDUAL_ERROR_FORMAT =
4646
"error avg %8.4f min %8.4f max %8.4f iterations %03u (%s evals/sec)";
47+
const char *const CONSOLE_LOG_SEPARATOR_LINE =
48+
"--------------------------------------------------------------------------"
49+
"-----";
50+
51+
void console_log_separator_line() {
52+
MStreamUtils::stdErrorStream() << CONSOLE_LOG_SEPARATOR_LINE << '\n';
53+
}
4754

4855
void console_log_solver_iteration_pre_solve(const LogLevel log_level,
4956
const bool is_normal_call,

src/mmSolver/adjust/adjust_consoleLogging.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
namespace mmsolver {
3030

31+
void console_log_separator_line();
32+
3133
void console_log_solver_iteration_pre_solve(const LogLevel log_level,
3234
const bool is_normal_call,
3335
const bool is_jacobian_call,

0 commit comments

Comments
 (0)