Change default printout to add host, process names and vpid
[babeltrace.git] / converter / babeltrace.c
index a6020737f8094f6c0dd158ab4ca2b0b64139eb4b..b8caa6a0bba2c55b8f312d38eaa282d1e4cc508a 100644 (file)
@@ -135,6 +135,7 @@ static void usage(FILE *fp)
        fprintf(fp, "  -f, --fields name1<,name2,...> Print additional fields:\n");
        fprintf(fp, "                                     all, trace, trace:hostname, trace:domain,\n");
        fprintf(fp, "                                     trace:procname, trace:vpid, loglevel.\n");
+       fprintf(fp, "                                     (default: trace:hostname,trace:procname,trace:vpid)\n");
        fprintf(fp, "      --clock-cycles             Timestamp in cycles\n");
        fprintf(fp, "      --clock-offset seconds     Clock offset in seconds\n");
        fprintf(fp, "      --clock-seconds            Print the timestamps as [sec.ns]\n");
@@ -193,18 +194,19 @@ static int get_fields_args(poptContext *pc)
        }
        str = strtok_r(strlist, ",", &strctx);
        do {
+               opt_trace_default_fields = 0;
                if (!strcmp(str, "all"))
                        opt_all_fields = 1;
                else if (!strcmp(str, "trace"))
                        opt_trace_field = 1;
+               else if (!strcmp(str, "trace:hostname"))
+                       opt_trace_hostname_field = 1;
                else if (!strcmp(str, "trace:domain"))
                        opt_trace_domain_field = 1;
                else if (!strcmp(str, "trace:procname"))
                        opt_trace_procname_field = 1;
                else if (!strcmp(str, "trace:vpid"))
                        opt_trace_vpid_field = 1;
-               else if (!strcmp(str, "trace:hostname"))
-                       opt_trace_hostname_field = 1;
                else if (!strcmp(str, "loglevel"))
                        opt_loglevel_field = 1;
                else {
This page took 0.031571 seconds and 4 git commands to generate.