File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,9 @@ static void update_entry(const mod_entry* entry, void *cookie) {
234
234
}
235
235
}
236
236
*entry->state = level;
237
- (*args->n_matches )++;
237
+ if (longest_match > 0 ) {
238
+ (*args->n_matches )++;
239
+ }
238
240
}
239
241
240
242
void update_module_map (const mod_entry* map, log_directive* dirs,
@@ -318,11 +320,10 @@ void update_log_settings(void* crate_map, char* settings) {
318
320
n_dirs, &n_matches);
319
321
320
322
if (n_matches < n_dirs) {
321
- // NB: Android compiler is complaining about format specifiers here
322
- // and I don't understand why
323
- /* printf("warning: got %" PRIdPTR " RUST_LOG specs, "
324
- "enabled %" PRIdPTR " flags.",
325
- (uintptr_t)n_dirs, (uintptr_t)n_matches);*/
323
+ fprintf (stderr, " warning: got %lu RUST_LOG specs but only matched %lu of them.\n "
324
+ " You may have mistyped a RUST_LOG spec.\n "
325
+ " Use RUST_LOG=::help to see the list of crates and modules.\n " ,
326
+ (unsigned long )n_dirs, (unsigned long )n_matches);
326
327
}
327
328
328
329
free (buffer);
You can’t perform that action at this time.
0 commit comments