Commit 369a3348 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5910 send engine status to stderr


git-svn-id: file:///svn/toku/tokudb@52786 c7de825b-a66e-492c-adef-691d508d4ae1
parent 68387648
...@@ -1476,18 +1476,18 @@ static void print_matching_engine_status_rows(DB_ENV *env, const char *pattern) ...@@ -1476,18 +1476,18 @@ static void print_matching_engine_status_rows(DB_ENV *env, const char *pattern)
int r = env->get_engine_status_text(env, buf, buf_size); int r = env->get_engine_status_text(env, buf, buf_size);
invariant_zero(r); invariant_zero(r);
const char newline[2] = { '\n', '\0' }; for (row = strtok_r(buf, "\n", &row_r); row != nullptr; row = strtok_r(nullptr, "\n", &row_r)) {
for (row = strtok_r(buf, newline, &row_r); row != nullptr; row = strtok_r(nullptr, newline, &row_r)) {
const char *p = pattern_copy; const char *p = pattern_copy;
for (int i = 0; i < num_patterns; i++, p += strlen(p) + 1) { for (int i = 0; i < num_patterns; i++, p += strlen(p) + 1) {
if (strstr(row, p) != nullptr) { if (strstr(row, p) != nullptr) {
printf("%s\n", row); fprintf(stderr, "%s\n", row);
} }
} }
} }
toku_free(pattern_copy); toku_free(pattern_copy);
toku_free(buf); toku_free(buf);
fflush(stderr);
} }
// TODO: stuff like this should be in a generalized header somwhere // TODO: stuff like this should be in a generalized header somwhere
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment