auto merge of #8046 : kmcallister/rust/unused-log, r=pcwalton

This commit is contained in:
bors 2013-07-28 12:52:25 -07:00
commit 6dc5e2c61f

View File

@ -234,7 +234,9 @@ static void update_entry(const mod_entry* entry, void *cookie) {
}
}
*entry->state = level;
(*args->n_matches)++;
if (longest_match > 0) {
(*args->n_matches)++;
}
}
void update_module_map(const mod_entry* map, log_directive* dirs,
@ -318,11 +320,10 @@ void update_log_settings(void* crate_map, char* settings) {
n_dirs, &n_matches);
if (n_matches < n_dirs) {
// NB: Android compiler is complaining about format specifiers here
// and I don't understand why
/*printf("warning: got %" PRIdPTR " RUST_LOG specs, "
"enabled %" PRIdPTR " flags.",
(uintptr_t)n_dirs, (uintptr_t)n_matches);*/
fprintf(stderr, "warning: got %lu RUST_LOG specs but only matched %lu of them.\n"
"You may have mistyped a RUST_LOG spec.\n"
"Use RUST_LOG=::help to see the list of crates and modules.\n",
(unsigned long)n_dirs, (unsigned long)n_matches);
}
free(buffer);