diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-05 14:55:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-05 14:55:04 +0300 |
commit | 1761095abc4aedf2502884a656307bc2f8305e36 (patch) | |
tree | e91e81bd1017f733ea1b1b1533f76c7a1cf34552 | |
parent | cd474b913b3fa1f55c1df17520a652950a38c03d (diff) |
Logging: use -1 log level to log all levels
-rw-r--r-- | source/creator/creator_args.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c index d4af3cd6b09..1baae1864bf 100644 --- a/source/creator/creator_args.c +++ b/source/creator/creator_args.c @@ -715,16 +715,19 @@ static int arg_handle_background_mode_set(int UNUSED(argc), const char **UNUSED( static const char arg_handle_log_level_set_doc[] = "<level>\n" "\n" -"\tSet the logging verbosity level (higher for more details) defaults to 1." +"\tSet the logging verbosity level (higher for more details) defaults to 1, use -1 to log all levels." ; static int arg_handle_log_level_set(int argc, const char **argv, void *UNUSED(data)) { const char *arg_id = "--log-level"; if (argc > 1) { const char *err_msg = NULL; - if (!parse_int_clamp(argv[1], NULL, 0, INT_MAX, &G.log.level, &err_msg)) { + if (!parse_int_clamp(argv[1], NULL, -1, INT_MAX, &G.log.level, &err_msg)) { printf("\nError: %s '%s %s'.\n", err_msg, arg_id, argv[1]); } + if (G.log.level == -1) { + G.log.level = INT_MAX; + } return 1; } else { |