Skip to content

Commit

Permalink
Debugging messages
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramn committed Apr 13, 2024
1 parent 68457aa commit 518fdc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/grib_index.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,11 @@ static int codes_index_add_file_internal(grib_index* index, const char* filename
grib_context_log(c, GRIB_LOG_ERROR, "File %s contains no messages", filename);
return GRIB_END_OF_FILE;
}

if (c->debug) {
fprintf(stderr, "ECCODES DEBUG %s %s\n", __func__, filename);
grib_index_dump(stderr, index, GRIB_DUMP_FLAG_TYPE);
}
return GRIB_SUCCESS;
}

Expand Down
3 changes: 3 additions & 0 deletions tests/grib_indexing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ rm -rf $temp_dir_A
${tools_dir}/grib_index_build -N -o $tempIndex1 $sample1 > /dev/null
${tools_dir}/grib_dump $tempIndex1 >/dev/null

# With DEBUG enabled
# --------------------
ECCODES_DEBUG=-1 ${tools_dir}/grib_index_build -N -o $tempIndex1 $sample1 > /dev/null

# ECC-1773: GRIB2 multi-field messages
# -------------------------------------
Expand Down

0 comments on commit 518fdc6

Please sign in to comment.