Skip to content

Commit efa7fa7

Browse files
committed
profiling: log rule profiling as json by default
We've been forcing JSON logging in our default configuration for some time now, just make it the actual default.
1 parent 06d42e8 commit efa7fa7

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/util-profiling-rules.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extern int profiling_output_to_file;
5656
int profiling_rules_enabled = 0;
5757
static char profiling_file_name[PATH_MAX] = "";
5858
static const char *profiling_file_mode = "a";
59-
static int profiling_rule_json = 0;
59+
static bool profiling_rule_json = true;
6060

6161
/**
6262
* Sort orders for dumping profiled rules.
@@ -157,8 +157,9 @@ void SCProfilingRulesGlobalInit(void)
157157

158158
profiling_output_to_file = 1;
159159
}
160-
if (SCConfNodeChildValueIsTrue(conf, "json")) {
161-
profiling_rule_json = 1;
160+
161+
if (SCConfNodeChildValueIsFalse(conf, "json")) {
162+
profiling_rule_json = false;
162163
}
163164
}
164165
}

suricata.yaml.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,8 +1970,8 @@ profiling:
19701970
# Limit the number of sids for which stats are shown at exit (per sort).
19711971
limit: 10
19721972

1973-
# output to json
1974-
json: yes
1973+
# output to json, default = yes.
1974+
#json: yes
19751975

19761976
# per keyword profiling
19771977
keywords:

0 commit comments

Comments
 (0)