diff options
author | Max Kellermann <max@duempel.org> | 2015-06-22 22:33:37 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-06-22 22:33:37 +0200 |
commit | 9f4f1bab39d3efa1f2cf1fa9fb861f8d38fdb652 (patch) | |
tree | e053d18aa9083b00f56c7b9db40737dd3ce29c09 /src/LogBackend.cxx | |
parent | 73bd6af0f9f1ce9c535ff0a4227e29df3631eb45 (diff) | |
download | mpd-9f4f1bab39d3efa1f2cf1fa9fb861f8d38fdb652.tar.gz mpd-9f4f1bab39d3efa1f2cf1fa9fb861f8d38fdb652.tar.xz mpd-9f4f1bab39d3efa1f2cf1fa9fb861f8d38fdb652.zip |
LogBackend: remove character set support
Always write UTF-8 to the log file.
Diffstat (limited to 'src/LogBackend.cxx')
-rw-r--r-- | src/LogBackend.cxx | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/LogBackend.cxx b/src/LogBackend.cxx index 64d523443..b1b692cd3 100644 --- a/src/LogBackend.cxx +++ b/src/LogBackend.cxx @@ -23,10 +23,6 @@ #include "util/Domain.hxx" #include "util/StringUtil.hxx" -#ifdef HAVE_GLIB -#include <glib.h> -#endif - #include <assert.h> #include <stdio.h> #include <string.h> @@ -65,10 +61,6 @@ ToAndroidLogLevel(LogLevel log_level) static LogLevel log_threshold = LogLevel::INFO; -#ifdef HAVE_GLIB -static const char *log_charset; -#endif - static bool enable_timestamp; #ifdef HAVE_SYSLOG @@ -81,16 +73,6 @@ SetLogThreshold(LogLevel _threshold) log_threshold = _threshold; } -#ifdef HAVE_GLIB - -void -SetLogCharset(const char *_charset) -{ - log_charset = _charset; -} - -#endif - void EnableLogTimestamp() { @@ -175,20 +157,6 @@ LogFinishSysLog() static void FileLog(const Domain &domain, const char *message) { -#ifdef HAVE_GLIB - char *converted; - - if (log_charset != nullptr) { - converted = g_convert_with_fallback(message, -1, - log_charset, "utf-8", - nullptr, nullptr, - nullptr, nullptr); - if (converted != nullptr) - message = converted; - } else - converted = nullptr; -#endif - fprintf(stderr, "%s%s: %.*s\n", enable_timestamp ? log_date() : "", domain.GetName(), @@ -199,10 +167,6 @@ FileLog(const Domain &domain, const char *message) to have an effect on WIN32 */ fflush(stderr); #endif - -#ifdef HAVE_GLIB - g_free(converted); -#endif } #endif /* !ANDROID */ |