Logging: Use CLOG for blenkernel
[blender.git] / source / blender / blenkernel / intern / library_remap.c
index 28d949a4f91f815e2a3951615706e99ddf50f740..420bf16d001d1f7e24ee963f4c6049fd413895a2 100644 (file)
@@ -31,6 +31,8 @@
 #include <stddef.h>
 #include <assert.h>
 
+#include "CLG_log.h"
+
 #include "MEM_guardedalloc.h"
 
 /* all types are needed here, in order to do memory operations */
 #include "BPY_extern.h"
 #endif
 
+static CLG_LogRef LOG = {"bke.library_remap"};
+
 static BKE_library_free_window_manager_cb free_windowmanager_cb = NULL;
 
 void BKE_library_callback_free_window_manager_set(BKE_library_free_window_manager_cb func)
@@ -496,9 +500,9 @@ void BKE_libblock_remap_locked(
        }
 
        if (old_id->us - skipped_refcounted < 0) {
-               printf("Error in remapping process from '%s' (%p) to '%s' (%p): "
-                      "wrong user count in old ID after process (summing up to %d)\n",
-                      old_id->name, old_id, new_id ? new_id->name : "<NULL>", new_id, old_id->us - skipped_refcounted);
+               CLOG_ERROR(&LOG, "Error in remapping process from '%s' (%p) to '%s' (%p): "
+                          "wrong user count in old ID after process (summing up to %d)",
+                          old_id->name, old_id, new_id ? new_id->name : "<NULL>", new_id, old_id->us - skipped_refcounted);
                BLI_assert(0);
        }