[Bf-blender-cvs] [5da31771902] blender-v2.93-release: Fix logging "bke.appdir" messages

Campbell Barton noreply at git.blender.org
Wed Apr 21 05:47:55 CEST 2021


Commit: 5da3177190254273790043318db7e6a177270d55
Author: Campbell Barton
Date:   Wed Apr 21 13:44:23 2021 +1000
Branches: blender-v2.93-release
https://developer.blender.org/rB5da3177190254273790043318db7e6a177270d55

Fix logging "bke.appdir" messages

Logging was initialized after BKE_appdir paths were initialized,
making it impossible to see paths which are checked on startup.

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

M	source/creator/creator_args.c

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

diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index d1899cc1408..d7f649b657d 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -2041,6 +2041,15 @@ void main_args_setup(bContext *C, bArgs *ba)
 
   BLI_args_add(ba, "-t", "--threads", CB(arg_handle_threads_set), NULL);
 
+  /* Include in the environment pass so it's possible display errors initializing subsystems,
+   * especially `bpy.appdir` since it's useful to show errors finding paths on startup. */
+  BLI_args_add(ba, NULL, "--log", CB(arg_handle_log_set), ba);
+  BLI_args_add(ba, NULL, "--log-level", CB(arg_handle_log_level_set), ba);
+  BLI_args_add(ba, NULL, "--log-show-basename", CB(arg_handle_log_show_basename_set), ba);
+  BLI_args_add(ba, NULL, "--log-show-backtrace", CB(arg_handle_log_show_backtrace_set), ba);
+  BLI_args_add(ba, NULL, "--log-show-timestamp", CB(arg_handle_log_show_timestamp_set), ba);
+  BLI_args_add(ba, NULL, "--log-file", CB(arg_handle_log_file_set), ba);
+
   /* Pass: Background Mode & Settings
    *
    * Also and commands that exit after usage. */
@@ -2062,13 +2071,6 @@ void main_args_setup(bContext *C, bArgs *ba)
 
   BLI_args_add(ba, "-a", NULL, CB(arg_handle_playback_mode), NULL);
 
-  BLI_args_add(ba, NULL, "--log", CB(arg_handle_log_set), ba);
-  BLI_args_add(ba, NULL, "--log-level", CB(arg_handle_log_level_set), ba);
-  BLI_args_add(ba, NULL, "--log-show-basename", CB(arg_handle_log_show_basename_set), ba);
-  BLI_args_add(ba, NULL, "--log-show-backtrace", CB(arg_handle_log_show_backtrace_set), ba);
-  BLI_args_add(ba, NULL, "--log-show-timestamp", CB(arg_handle_log_show_timestamp_set), ba);
-  BLI_args_add(ba, NULL, "--log-file", CB(arg_handle_log_file_set), ba);
-
   BLI_args_add(ba, "-d", "--debug", CB(arg_handle_debug_mode_set), ba);
 
 #  ifdef WITH_FFMPEG



More information about the Bf-blender-cvs mailing list