Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-03-31 13:52:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-03-31 13:52:47 +0300
commitac4513a5b84017e5e95fc4b84e3e8444fd2c8494 (patch)
treedd1f668cedbffba0ae019446fffe4239a4df13cf /source
parent5f59c22bf1ab5387f23fc9f4b5cf53b85f2582b8 (diff)
Logging: add ability to exclude categories.
Diffstat (limited to 'source')
-rw-r--r--source/creator/creator_args.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index 17fa18916fd..3be16ba650b 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -761,6 +761,7 @@ static int arg_handle_log_file_set(int argc, const char **argv, void *UNUSED(dat
static const char arg_handle_log_set_doc[] =
"\n\tEnable logging categories, taking a single comma separated argument.\n"
"\tMultiple categories can be matched using a '.*' suffix, so '--log \"wm.*\"' logs every kind of window-manager message.\n"
+"\tUse \"^\" prefix to ignore, so '--log \"*,^wm.operator.*\"' logs all except for 'wm.operators.*'\n"
"\tUse \"*\" to log everything."
;
static int arg_handle_log_set(int argc, const char **argv, void *UNUSED(data))
@@ -772,7 +773,12 @@ static int arg_handle_log_set(int argc, const char **argv, void *UNUSED(data))
const char *str_step_end = strchr(str_step, ',');
int str_step_len = str_step_end ? (str_step_end - str_step) : strlen(str_step);
- CLG_type_filter(str_step, str_step_len);
+ if (str_step[0] == '^') {
+ CLG_type_filter_exclude(str_step + 1, str_step_len - 1);
+ }
+ else {
+ CLG_type_filter_include(str_step, str_step_len);
+ }
if (str_step_end) {
/* typically only be one, but don't fail on multiple.*/