bt_self_component *self_comp = trace->self_comp;
enum lttng_live_get_one_metadata_status metadata_status;
+ BT_COMP_LOGD("Updating metadata for trace: trace-id=%"PRIu64, trace->id);
+
/* No metadata stream yet. */
if (!metadata) {
if (session->new_streams_needed) {
keep_receiving = false;
break;
case LTTNG_LIVE_GET_ONE_METADATA_STATUS_CLOSED:
+ BT_COMP_LOGD("Metadata stream was closed by the Relay, the trace is no longer active: "
+ "trace-id=%"PRIu64", metadata-stream-id=%"PRIu64,
+ trace->id, metadata->stream_id);
keep_receiving = false;
break;
case LTTNG_LIVE_GET_ONE_METADATA_STATUS_ERROR:
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Error getting one trace metadata packet: "
+ "trace-id=%"PRIu64, trace->id);
goto error;
default:
bt_common_abort();
/* The memory buffer `metadata_buf` contains all the metadata. */
if (bt_close_memstream(&metadata_buf, &size, fp)) {
- BT_COMP_LOGE_APPEND_CAUSE_ERRNO(self_comp,
- "Metadata bt_close_memstream", ".");
+ BT_COMP_LOGW_ERRNO("Metadata bt_close_memstream", ".");
}
fp = NULL;
* The call to ctf_metadata_decoder_append_content() will append
* new metadata to our current trace class.
*/
+ BT_COMP_LOGD("Appending new metadata to the ctf_trace class");
decoder_status = ctf_metadata_decoder_append_content(
metadata->decoder, fp);
switch (decoder_status) {
closeret = fclose(fp);
if (closeret) {
- BT_COMP_LOGE_APPEND_CAUSE_ERRNO(self_comp,
- "Error on fclose", ".");
+ BT_COMP_LOGW_ERRNO("Error on fclose", ".");
}
}
free(metadata_buf);