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/appdir.c
parent8a51af7d1c98500022b1ff789284f9e0a3c038cd (diff)
Logging: Use CLOG for blenkernel
Part of D4277 by @sobakasu
Diffstat (limited to 'source/blender/blenkernel/intern/appdir.c')
-rw-r--r--source/blender/blenkernel/intern/appdir.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c
index fc24ccc9fa0..86c25b3e081 100644
--- a/source/blender/blenkernel/intern/appdir.c
+++ b/source/blender/blenkernel/intern/appdir.c
@@ -41,6 +41,8 @@
#include "MEM_guardedalloc.h"
+#include "CLG_log.h"
+
#ifdef WIN32
# include "utf_winfunc.h"
# include "utfconv.h"
@@ -60,6 +62,7 @@
#endif /* WIN32 */
/* local */
+static CLG_LogRef LOG = {"bke.appdir"};
static char bprogname[FILE_MAX]; /* full path to program executable */
static char bprogdir[FILE_MAX]; /* full path to directory in which executable is located */
static char btempdir_base[FILE_MAX]; /* persistent temporary directory */
@@ -569,7 +572,7 @@ static void where_am_i(char *fullname, const size_t maxlen, const char *name)
if (GetModuleFileNameW(0, fullname_16, maxlen)) {
conv_utf_16_to_8(fullname_16, fullname, maxlen);
if (!BLI_exists(fullname)) {
- printf("path can't be found: \"%.*s\"\n", (int)maxlen, fullname);
+ CLOG_ERROR(&LOG, "path can't be found: \"%.*s\"", (int)maxlen, fullname);
MessageBox(NULL, "path contains invalid characters or is too long (see console)", "Error", MB_OK);
}
MEM_freeN(fullname_16);
@@ -605,7 +608,7 @@ static void where_am_i(char *fullname, const size_t maxlen, const char *name)
#if defined(DEBUG)
if (!STREQ(name, fullname)) {
- printf("guessing '%s' == '%s'\n", name, fullname);
+ CLOG_INFO(&LOG, 2, "guessing '%s' == '%s'", name, fullname);
}
#endif
}
@@ -852,7 +855,7 @@ static void where_is_temp(char *fullname, char *basename, const size_t maxlen, c
BLI_add_slash(fullname);
}
else {
- printf("Warning! Could not generate a temp file name for '%s', falling back to '%s'\n", tmp_name, fullname);
+ CLOG_WARN(&LOG, "Could not generate a temp file name for '%s', falling back to '%s'", tmp_name, fullname);
}
MEM_freeN(tmp_name);