- attr_name = bt_ctf_event_class_get_attribute_name(event_class, i);
- if (!attr_name) {
- fprintf(err, "[error] %s in %s:%d\n", __func__,
- __FILE__, __LINE__);
- BT_PUT(writer_event_class);
- goto end;
- }
- attr_value = bt_ctf_event_class_get_attribute_value(event_class, i);
- if (!attr_value) {
+ ret = bt_ctf_event_class_set_id(writer_event_class, id);
+ if (ret) {
+ fprintf(err, "[error] %s in %s:%d\n", __func__,
+ __FILE__, __LINE__);
+ goto error;
+ }
+
+ log_level = bt_ctf_event_class_get_log_level(event_class);
+ if (log_level < 0) {
+ fprintf(err, "[error] %s in %s:%d\n", __func__,
+ __FILE__, __LINE__);
+ goto error;
+ }
+
+ ret = bt_ctf_event_class_set_log_level(writer_event_class, log_level);
+ if (ret) {
+ fprintf(err, "[error] %s in %s:%d\n", __func__,
+ __FILE__, __LINE__);
+ goto error;
+ }
+
+ emf_uri = bt_ctf_event_class_get_emf_uri(event_class);
+ if (emf_uri) {
+ ret = bt_ctf_event_class_set_emf_uri(writer_event_class,
+ emf_uri);
+ if (ret) {