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/DespotifyUtils.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/DespotifyUtils.cxx')
-rw-r--r-- | src/DespotifyUtils.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/DespotifyUtils.cxx b/src/DespotifyUtils.cxx index 3747ddbd9..cf95998ad 100644 --- a/src/DespotifyUtils.cxx +++ b/src/DespotifyUtils.cxx @@ -21,13 +21,15 @@ #include "tag/Tag.hxx" #include "ConfigGlobal.hxx" #include "ConfigOption.hxx" - -#include <glib.h> +#include "util/Domain.hxx" +#include "Log.hxx" extern "C" { #include <despotify.h> } +const Domain despotify_domain("despotify"); + static struct despotify_session *g_session; static void (*registered_callbacks[8])(struct despotify_session *, int, void *, void *); @@ -121,24 +123,27 @@ struct despotify_session *mpd_despotify_get_session(void) high_bitrate = config_get_bool(CONF_DESPOTIFY_HIGH_BITRATE, true); if (user == NULL || passwd == NULL) { - g_debug("disabling despotify because account is not configured"); + LogDebug(despotify_domain, + "disabling despotify because account is not configured"); return nullptr; } if (!despotify_init()) { - g_debug("Can't initialize despotify\n"); + LogWarning(despotify_domain, "Can't initialize despotify"); return nullptr; } g_session = despotify_init_client(callback, NULL, high_bitrate, true); if (!g_session) { - g_debug("Can't initialize despotify client\n"); + LogWarning(despotify_domain, + "Can't initialize despotify client"); return nullptr; } if (!despotify_authenticate(g_session, user, passwd)) { - g_debug("Can't authenticate despotify session\n"); + LogWarning(despotify_domain, + "Can't authenticate despotify session"); despotify_exit(g_session); return nullptr; } |