diff options
author | Max Kellermann <max@duempel.org> | 2013-09-27 22:31:24 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-02 08:57:55 +0200 |
commit | 060814daa83f6a94f5934464ae42a406c5c7e947 (patch) | |
tree | f636ec6cdbb8e52fda6db987d2a28fc73c7b94b4 /src/input/CurlInputPlugin.cxx | |
parent | c53492a76a8a05825e1c7f699c05645eee891199 (diff) | |
download | mpd-060814daa83f6a94f5934464ae42a406c5c7e947.tar.gz mpd-060814daa83f6a94f5934464ae42a406c5c7e947.tar.xz mpd-060814daa83f6a94f5934464ae42a406c5c7e947.zip |
Log: new logging library API
Prepare to migrate away from GLib. Currently, we're still using GLib
as a backend.
Diffstat (limited to 'src/input/CurlInputPlugin.cxx')
-rw-r--r-- | src/input/CurlInputPlugin.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/input/CurlInputPlugin.cxx b/src/input/CurlInputPlugin.cxx index 2c99f5c38..b707da2f0 100644 --- a/src/input/CurlInputPlugin.cxx +++ b/src/input/CurlInputPlugin.cxx @@ -31,6 +31,7 @@ #include "IOThread.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" +#include "Log.hxx" #include <assert.h> @@ -53,9 +54,6 @@ #error libcurl is too old #endif -#undef G_LOG_DOMAIN -#define G_LOG_DOMAIN "input_curl" - /** * Do not buffer more than this number of bytes. It should be a * reasonable limit that doesn't make low-end machines suffer too @@ -297,8 +295,9 @@ CurlSockets::UpdateSockets() CURLMcode mcode = curl_multi_fdset(curl.multi, &rfds, &wfds, &efds, &max_fd); if (mcode != CURLM_OK) { - g_warning("curl_multi_fdset() failed: %s\n", - curl_multi_strerror(mcode)); + FormatError(curlm_domain, + "curl_multi_fdset() failed: %s", + curl_multi_strerror(mcode)); return; } @@ -537,8 +536,9 @@ CurlSockets::PrepareSockets() return timeout2; } else { - g_warning("curl_multi_timeout() failed: %s\n", - curl_multi_strerror(mcode)); + FormatWarning(curlm_domain, + "curl_multi_timeout() failed: %s", + curl_multi_strerror(mcode)); return -1; } } @@ -880,7 +880,7 @@ input_curl_headerfunction(void *ptr, size_t size, size_t nmemb, void *stream) buffer[end - value] = 0; icy_metaint = g_ascii_strtoull(buffer, NULL, 10); - g_debug("icy-metaint=%zu", icy_metaint); + FormatDebug(curl_domain, "icy-metaint=%zu", icy_metaint); if (icy_metaint > 0) { c->icy.Start(icy_metaint); |