mirror of https://github.com/ecmwf/eccodes.git
Indexing: print message number in case of failure
This commit is contained in:
parent
f0c8a2cf26
commit
1db1c0831c
|
@ -1168,7 +1168,8 @@ int _codes_index_add_file(grib_index* index, const char* filename, int message_t
|
|||
return err;
|
||||
}
|
||||
if (err && err != GRIB_NOT_FOUND) {
|
||||
grib_context_log(c, GRIB_LOG_ERROR, "unable to create index. \"%s\": %s", index_key->name, grib_get_error_message(err));
|
||||
grib_context_log(c, GRIB_LOG_ERROR, "unable to create index. key=\"%s\" (message #%lu): %s",
|
||||
index_key->name, message_count, grib_get_error_message(err));
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ int grib_tool_finalise_action(grib_runtime_options* options)
|
|||
printf(" }\n");
|
||||
the_keys = the_keys->next;
|
||||
}
|
||||
printf("--- %d messages indexed\n", idx->count);
|
||||
printf("--- %d message(s) indexed\n", idx->count);
|
||||
|
||||
if (idx->count)
|
||||
grib_index_write(idx, options->outfile->name);
|
||||
|
|
|
@ -148,7 +148,7 @@ int grib_tool_finalise_action(grib_runtime_options* options)
|
|||
printf(" }\n");
|
||||
the_keys = the_keys->next;
|
||||
}
|
||||
printf("--- %d messages indexed\n", idx->count);
|
||||
printf("--- %d message(s) indexed\n", idx->count);
|
||||
|
||||
if (idx->count)
|
||||
grib_index_write(idx, options->outfile->name);
|
||||
|
|
Loading…
Reference in New Issue