From 552b2287db86ed6e77565672fbccff1d553f823f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 1 Feb 2019 12:44:19 +1100 Subject: Logging: Use CLOG for blenkernel Part of D4277 by @sobakasu --- source/blender/blenkernel/intern/bpath.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/intern/bpath.c') diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c index 0ada712a855..0ee10ccdad8 100644 --- a/source/blender/blenkernel/intern/bpath.c +++ b/source/blender/blenkernel/intern/bpath.c @@ -81,10 +81,14 @@ #include "BKE_bpath.h" /* own include */ +#include "CLG_log.h" + #ifndef _MSC_VER # include "BLI_strict_flags.h" #endif +static CLG_LogRef LOG = {"bke.bpath"}; + static bool checkMissingFiles_visit_cb(void *userdata, char *UNUSED(path_dst), const char *path_src) { ReportList *reports = (ReportList *)userdata; @@ -141,7 +145,7 @@ void BKE_bpath_relative_convert(Main *bmain, const char *basedir, ReportList *re const int flag = BKE_BPATH_TRAVERSE_SKIP_LIBRARY; if (basedir[0] == '\0') { - printf("%s: basedir='', this is a bug\n", __func__); + CLOG_ERROR(&LOG, "basedir='', this is a bug"); return; } @@ -185,7 +189,7 @@ void BKE_bpath_absolute_convert(Main *bmain, const char *basedir, ReportList *re const int flag = BKE_BPATH_TRAVERSE_SKIP_LIBRARY; if (basedir[0] == '\0') { - printf("%s: basedir='', this is a bug\n", __func__); + CLOG_ERROR(&LOG, "basedir='', this is a bug"); return; } @@ -684,8 +688,7 @@ bool BKE_bpath_relocate_visitor(void *pathbase_v, char *path_dst, const char *pa const char *base_old = ((char **)pathbase_v)[1]; if (BLI_path_is_rel(base_old)) { - printf("%s: error, old base path '%s' is not absolute.\n", - __func__, base_old); + CLOG_ERROR(&LOG, "old base path '%s' is not absolute.", base_old); return false; } -- cgit v1.2.3