@@ -31,7 +31,7 @@
static bool debug;
static bool notimeout;
-static int log_level = TEP_LOG_INFO;
+static int log_level = TEP_LOG_WARNING;
static FILE *logfp;
const static struct {
@@ -393,8 +393,6 @@ trace_load_plugins(struct tep_handle *tep, int flags)
void tracecmd_set_loglevel(enum tep_loglevel level)
{
log_level = level;
- tracefs_set_loglevel(level);
- tep_set_loglevel(level);
}
void __weak tracecmd_warning(const char *fmt, ...)
@@ -40,6 +40,7 @@ void usage(char **argv);
extern int silence_warnings;
extern int show_status;
+void trace_set_loglevel(int level);
int trace_set_verbose(char *level);
enum port_type {
@@ -76,6 +76,13 @@ static struct trace_log_severity {
{ .id = TEP_LOG_ALL, .name = "all" },
};
+void trace_set_loglevel(int level)
+{
+ tracecmd_set_loglevel(level);
+ tracefs_set_loglevel(level);
+ tep_set_loglevel(level);
+}
+
int trace_set_verbose(char *level)
{
int id;
@@ -89,7 +96,7 @@ int trace_set_verbose(char *level)
if (id >= TEP_LOG_NONE) {
if (id > TEP_LOG_ALL)
id = TEP_LOG_ALL;
- tracecmd_set_loglevel(id);
+ trace_set_loglevel(id);
return 0;
}
} else {
@@ -98,7 +105,7 @@ int trace_set_verbose(char *level)
for (i = 0; i < size; i++) {
if (!strncmp(level, log_severity[i].name, strlen(log_severity[i].name))) {
- tracecmd_set_loglevel(log_severity[i].id);
+ trace_set_loglevel(log_severity[i].id);
return 0;
}
}
@@ -1565,6 +1565,8 @@ void trace_report (int argc, char **argv)
signal(SIGINT, sig_end);
+ trace_set_loglevel(TEP_LOG_INFO);
+
for (;;) {
int option_index = 0;
static struct option long_options[] = {