diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-03-29 21:38:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-03-30 19:57:41 +0300 |
commit | 891c1cfc9a355171215821fc91b694273503f139 (patch) | |
tree | 817fb055cf0d18f279a3ad6ca2745c0d1bd77a7c /source/blender/windowmanager/intern/wm_init_exit.c | |
parent | c647c93f63051b12c4b1722171ad7b4a2e178ade (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/blender/windowmanager/intern/wm_init_exit.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 9b4868523dc..2743216ee07 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -40,6 +40,8 @@ #include "MEM_guardedalloc.h" +#include "CLG_log.h" + #include "DNA_genfile.h" #include "DNA_scene_types.h" #include "DNA_userdef_types.h" @@ -127,6 +129,11 @@ # include "BKE_subsurf.h" #endif +CLG_LOGREF_DECLARE_GLOBAL(WM_LOG_OPERATORS, "wm.operator"); +CLG_LOGREF_DECLARE_GLOBAL(WM_LOG_HANDLERS, "wm.handler"); +CLG_LOGREF_DECLARE_GLOBAL(WM_LOG_EVENTS, "wm.event"); +CLG_LOGREF_DECLARE_GLOBAL(WM_LOG_KEYMAPS, "wm.keymap"); + static void wm_init_reports(bContext *C) { ReportList *reports = CTX_wm_reports(C); @@ -613,6 +620,8 @@ void WM_exit_ext(bContext *C, const bool do_python) * see also T50676. */ BKE_sound_exit(); + CLG_exit(); + BKE_blender_atexit(); if (MEM_get_memory_blocks_in_use() != 0) { |