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>2019-02-01 04:44:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-01 04:46:39 +0300
commit552b2287db86ed6e77565672fbccff1d553f823f (patch)
tree235ad970599910d52c822bb89d23fb467f44f1bd /source/blender/blenkernel/intern/icons.c
parent8a51af7d1c98500022b1ff789284f9e0a3c038cd (diff)
Logging: Use CLOG for blenkernel
Part of D4277 by @sobakasu
Diffstat (limited to 'source/blender/blenkernel/intern/icons.c')
-rw-r--r--source/blender/blenkernel/intern/icons.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c
index 2a348751365..b3e2c8537ea 100644
--- a/source/blender/blenkernel/intern/icons.c
+++ b/source/blender/blenkernel/intern/icons.c
@@ -35,6 +35,8 @@
#include <stdlib.h>
#include <string.h>
+#include "CLG_log.h"
+
#include "MEM_guardedalloc.h"
#include "DNA_brush_types.h"
@@ -77,6 +79,8 @@ enum {
/* GLOBALS */
+static CLG_LogRef LOG = {"bke.icons"};
+
static GHash *gIcons = NULL;
static int gNextIconId = 1;
@@ -588,7 +592,7 @@ int BKE_icon_id_ensure(struct ID *id)
id->icon_id = get_next_free_id();
if (!id->icon_id) {
- printf("%s: Internal error - not enough IDs\n", __func__);
+ CLOG_ERROR(&LOG, "not enough IDs");
return 0;
}
@@ -633,7 +637,7 @@ int BKE_icon_gplayer_color_ensure(bGPDlayer *gpl)
gpl->runtime.icon_id = get_next_free_id();
if (!gpl->runtime.icon_id) {
- printf("%s: Internal error - not enough IDs\n", __func__);
+ CLOG_ERROR(&LOG, "not enough IDs");
return 0;
}
@@ -665,7 +669,7 @@ int BKE_icon_preview_ensure(ID *id, PreviewImage *preview)
preview->icon_id = get_next_free_id();
if (!preview->icon_id) {
- printf("%s: Internal error - not enough IDs\n", __func__);
+ CLOG_ERROR(&LOG, "not enough IDs");
return 0;
}
@@ -690,7 +694,7 @@ Icon *BKE_icon_get(const int icon_id)
icon = BLI_ghash_lookup(gIcons, POINTER_FROM_INT(icon_id));
if (!icon) {
- printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id);
+ CLOG_ERROR(&LOG, "no icon for icon ID: %d", icon_id);
return NULL;
}
@@ -704,7 +708,7 @@ void BKE_icon_set(const int icon_id, struct Icon *icon)
void **val_p;
if (BLI_ghash_ensure_p(gIcons, POINTER_FROM_INT(icon_id), &val_p)) {
- printf("%s: Internal error, icon already set: %d\n", __func__, icon_id);
+ CLOG_ERROR(&LOG, "icon already set: %d", icon_id);
return;
}