[Bf-blender-cvs] [1761095abc4] master: Logging: use -1 log level to log all levels

Campbell Barton noreply at git.blender.org
Thu Apr 5 13:55:41 CEST 2018


Commit: 1761095abc4aedf2502884a656307bc2f8305e36
Author: Campbell Barton
Date:   Thu Apr 5 13:55:04 2018 +0200
Branches: master
https://developer.blender.org/rB1761095abc4aedf2502884a656307bc2f8305e36

Logging: use -1 log level to log all levels

===================================================================

M	source/creator/creator_args.c

===================================================================

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 {



More information about the Bf-blender-cvs mailing list