aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/helpers.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-28 02:16:46 -0800
committerChris Robinson <[email protected]>2018-12-28 12:29:05 -0800
commit983904bbdce5d0973c3cda143f499872e55013e3 (patch)
tree201052174329b177066707d683f9da085aa28af6 /Alc/helpers.cpp
parentaff58265cb458b2ac2c42fef96383e9751d094d1 (diff)
Add a method to prefix logged function names
Diffstat (limited to 'Alc/helpers.cpp')
-rw-r--r--Alc/helpers.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/helpers.cpp b/Alc/helpers.cpp
index 2db544b8..4a80c7e5 100644
--- a/Alc/helpers.cpp
+++ b/Alc/helpers.cpp
@@ -361,7 +361,7 @@ void *GetSymbol(void *handle, const char *name)
}
-void al_print(const char *type, const char *func, const char *fmt, ...)
+void al_print(const char *type, const char *prefix, const char *func, const char *fmt, ...)
{
char str[1024];
va_list ap;
@@ -372,7 +372,7 @@ void al_print(const char *type, const char *func, const char *fmt, ...)
str[sizeof(str)-1] = 0;
std::wstring wstr{utf8_to_wstr(str)};
- fprintf(gLogFile, "AL lib: %s %s: %ls", type, func, wstr.c_str());
+ fprintf(gLogFile, "AL lib: %s %s%s: %ls", type, prefix, func, wstr.c_str());
fflush(gLogFile);
}
@@ -588,12 +588,12 @@ void *GetSymbol(void *handle, const char *name)
#endif /* HAVE_DLFCN_H */
-void al_print(const char *type, const char *func, const char *fmt, ...)
+void al_print(const char *type, const char *prefix, const char *func, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
- fprintf(gLogFile, "AL lib: %s %s: ", type, func);
+ fprintf(gLogFile, "AL lib: %s %s%s: ", type, prefix, func);
vfprintf(gLogFile, fmt, ap);
va_end(ap);