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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-03-29 21:38:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-03-30 19:57:41 +0300
commit891c1cfc9a355171215821fc91b694273503f139 (patch)
tree817fb055cf0d18f279a3ad6ca2745c0d1bd77a7c /source/creator/creator.c
parentc647c93f63051b12c4b1722171ad7b4a2e178ade (diff)
C Logging: use instead of printf for messages
- See `--log` help message for usage. - Supports enabling categories. - Color severity. - Optionally logs to a file. - Currently use to replace printf calls in wm module. See D3120 for details.
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r--source/creator/creator.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index a59a45f885c..962d6720760 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -42,6 +42,8 @@
#include "MEM_guardedalloc.h"
+#include "CLG_log.h"
+
#include "DNA_genfile.h"
#include "BLI_args.h"
@@ -49,6 +51,7 @@
#include "BLI_utildefines.h"
#include "BLI_callbacks.h"
#include "BLI_string.h"
+#include "BLI_system.h"
/* mostly init functions */
#include "BKE_appdir.h"
@@ -180,6 +183,11 @@ static void callback_main_atexit(void *user_data)
#endif
}
+static void callback_clg_fatal(void *fp)
+{
+ BLI_system_backtrace(fp);
+}
+
/** \} */
@@ -304,6 +312,10 @@ int main(
sdlewInit();
#endif
+ /* Initialize logging */
+ CLG_init();
+ CLG_fatal_fn_set(callback_clg_fatal);
+
C = CTX_create();
#ifdef WITH_PYTHON_MODULE