#include <babeltrace/ctf-ir/metadata.h>
#include <stdarg.h>
+int babeltrace_verbose, babeltrace_debug;
+
struct stream_saved_pos {
/*
* Use file_stream pointer to check if the trace collection we
babeltrace_iter_destroy(iter);
return ret;
}
+
+static
+void __attribute__((constructor)) init_babeltrace_lib(void)
+{
+ if (getenv("BABELTRACE_VERBOSE"))
+ babeltrace_verbose = 1;
+ if (getenv("BABELTRACE_DEBUG"))
+ babeltrace_debug = 1;
+}
static const char *opt_input_path;
static const char *opt_output_path;
-int babeltrace_verbose, babeltrace_debug;
-int opt_field_names;
-
static struct trace_collection trace_collection_read;
static struct format *fmt_read;
fprintf(fp, " -h, --help This help message\n");
fprintf(fp, " -l, --list List available formats\n");
fprintf(fp, " -v, --verbose Verbose mode\n");
+ fprintf(fp, " (or set BABELTRACE_VERBOSE env. var.)\n");
fprintf(fp, " -d, --debug Debug mode\n");
+ fprintf(fp, " (or set BABELTRACE_DEBUG env. var.)\n");
fprintf(fp, " -n, --names Print field names\n");
list_formats(fp);
fprintf(fp, "\n");
#include <unistd.h>
#include <stdlib.h>
+int opt_field_names;
+
struct trace_descriptor *ctf_text_open_trace(const char *path, int flags,
void (*move_pos_slow)(struct ctf_stream_pos *pos, size_t offset,
int whence), FILE *metadata_fp);