mirror of https://github.com/ecmwf/eccodes.git
Logging: use __func__
This commit is contained in:
parent
6ddbf5b4d0
commit
c592821a89
|
@ -306,7 +306,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
#endif
|
#endif
|
||||||
if (grib_get_nearest_smaller_value(hand, self->reference_value, val[0], &reference_value) != GRIB_SUCCESS) {
|
if (grib_get_nearest_smaller_value(hand, self->reference_value, val[0], &reference_value) != GRIB_SUCCESS) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"CCSDS pack_double: unable to find nearest_smaller_value of %g for %s", min, self->reference_value);
|
"CCSDS %s: unable to find nearest_smaller_value of %g for %s", __func__, min, self->reference_value);
|
||||||
return GRIB_INTERNAL_ERROR;
|
return GRIB_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
if ((err = grib_set_double_internal(hand, self->reference_value, reference_value)) != GRIB_SUCCESS)
|
if ((err = grib_set_double_internal(hand, self->reference_value, reference_value)) != GRIB_SUCCESS)
|
||||||
|
@ -333,13 +333,13 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
|
|
||||||
if (grib_get_nearest_smaller_value(hand, self->reference_value, min, &reference_value) != GRIB_SUCCESS) {
|
if (grib_get_nearest_smaller_value(hand, self->reference_value, min, &reference_value) != GRIB_SUCCESS) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"CCSDS pack_double: unable to find nearest_smaller_value of %g for %s", min, self->reference_value);
|
"CCSDS %s: unable to find nearest_smaller_value of %g for %s", __func__, min, self->reference_value);
|
||||||
return GRIB_INTERNAL_ERROR;
|
return GRIB_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reference_value > min) {
|
if (reference_value > min) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"CCSDS pack_double: reference_value=%g min_value=%g diff=%g", reference_value, min, reference_value - min);
|
"CCSDS %s: reference_value=%g min_value=%g diff=%g", __func__, reference_value, min, reference_value - min);
|
||||||
DebugAssert(reference_value <= min);
|
DebugAssert(reference_value <= min);
|
||||||
return GRIB_INTERNAL_ERROR;
|
return GRIB_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -376,7 +376,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
}
|
}
|
||||||
if (grib_get_nearest_smaller_value(hand, self->reference_value, min, &reference_value) != GRIB_SUCCESS) {
|
if (grib_get_nearest_smaller_value(hand, self->reference_value, min, &reference_value) != GRIB_SUCCESS) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"CCSDS pack_double: unable to find nearest_smaller_value of %g for %s", min, self->reference_value);
|
"CCSDS %s: unable to find nearest_smaller_value of %g for %s", __func__, min, self->reference_value);
|
||||||
return GRIB_INTERNAL_ERROR;
|
return GRIB_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
d = grib_power(decimal_scale_factor, 10);
|
d = grib_power(decimal_scale_factor, 10);
|
||||||
|
@ -449,8 +449,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
if (hand->context->debug) print_aec_stream_info(&strm, "pack_double");
|
if (hand->context->debug) print_aec_stream_info(&strm, "pack_double");
|
||||||
|
|
||||||
if ((err = aec_buffer_encode(&strm)) != AEC_OK) {
|
if ((err = aec_buffer_encode(&strm)) != AEC_OK) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "CCSDS pack_double: aec_buffer_encode error %d (%s)\n",
|
grib_context_log(a->context, GRIB_LOG_ERROR, "CCSDS %s: aec_buffer_encode error %d (%s)",
|
||||||
err, aec_get_error_message(err));
|
__func__, err, aec_get_error_message(err));
|
||||||
err = GRIB_ENCODING_ERROR;
|
err = GRIB_ENCODING_ERROR;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -567,9 +567,9 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||||
if (hand->context->debug) print_aec_stream_info(&strm, "unpack_*");
|
if (hand->context->debug) print_aec_stream_info(&strm, "unpack_*");
|
||||||
|
|
||||||
if ((err = aec_buffer_decode(&strm)) != AEC_OK) {
|
if ((err = aec_buffer_decode(&strm)) != AEC_OK) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "CCSDS %s: aec_buffer_decode error %d (%s)\n",
|
grib_context_log(a->context, GRIB_LOG_ERROR, "CCSDS %s: aec_buffer_decode error %d (%s)",
|
||||||
__func__, err, aec_get_error_message(err));
|
__func__, err, aec_get_error_message(err));
|
||||||
err = GRIB_ENCODING_ERROR;
|
err = GRIB_DECODING_ERROR;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue