@@ -52,6 +52,14 @@ OPTIONS
Print all meta data from the file.
*--help*::
Print usage information.
+*--verbose* 'level'::
+ Set the log level. Supported log levels are "none", "critical", "error", "warning",
+ "info", "debug", "all" or their identifiers "0", "1", "2", "3", "4", "5", "6". Setting the log
+ level to specific value enables all logs from that and all previous levels.
+
+ Example: enable all critical, error and warning logs
+
+ trace-cmd report --verbose warning
EXAMPLES
--------
@@ -678,6 +678,7 @@ static void dump_file(const char *file)
}
enum {
+ OPT_verbose = 242,
OPT_clock = 243,
OPT_all = 244,
OPT_summary = 245,
@@ -722,6 +723,7 @@ void trace_dump(int argc, char **argv)
{"clock", no_argument, NULL, OPT_clock},
{"validate", no_argument, NULL, 'v'},
{"help", no_argument, NULL, '?'},
+ {"verbose", required_argument, NULL, OPT_verbose},
{NULL, 0, NULL, 0}
};
@@ -778,6 +780,10 @@ void trace_dump(int argc, char **argv)
case OPT_clock:
verbosity |= CLOCK;
break;
+ case OPT_verbose:
+ if (trace_set_verbose(optarg) < 0)
+ die("invalid verbose level %s", optarg);
+ break;
default:
usage(argv);
}
@@ -393,6 +393,7 @@ static struct usage_help usage_help[] = {
" --flyrecord information of offset and count of recorded events per CPU\n"
" --clock trace clock, saved in the file\n"
" -h, --help show usage information\n"
+ " --verbose 'level' Set the desired log level\n"
},
{
NULL, NULL, NULL
Add new "trace-cmd dump --verbose" argument for setting the desired log level. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> --- Documentation/trace-cmd/trace-cmd-dump.1.txt | 8 ++++++++ tracecmd/trace-dump.c | 6 ++++++ tracecmd/trace-usage.c | 1 + 3 files changed, 15 insertions(+)