aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist/AsxPlaylistPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-27 22:31:24 +0200
committerMax Kellermann <max@duempel.org>2013-10-02 08:57:55 +0200
commit060814daa83f6a94f5934464ae42a406c5c7e947 (patch)
treef636ec6cdbb8e52fda6db987d2a28fc73c7b94b4 /src/playlist/AsxPlaylistPlugin.cxx
parentc53492a76a8a05825e1c7f699c05645eee891199 (diff)
downloadmpd-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/playlist/AsxPlaylistPlugin.cxx')
-rw-r--r--src/playlist/AsxPlaylistPlugin.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/playlist/AsxPlaylistPlugin.cxx b/src/playlist/AsxPlaylistPlugin.cxx
index 19fa5a0fb..4dcbf56b9 100644
--- a/src/playlist/AsxPlaylistPlugin.cxx
+++ b/src/playlist/AsxPlaylistPlugin.cxx
@@ -25,14 +25,15 @@
#include "Song.hxx"
#include "tag/Tag.hxx"
#include "util/Error.hxx"
+#include "util/Domain.hxx"
+#include "Log.hxx"
#include <glib.h>
#include <assert.h>
#include <string.h>
-#undef G_LOG_DOMAIN
-#define G_LOG_DOMAIN "asx"
+static constexpr Domain asx_domain("asx");
/**
* This is the state object for the GLib XML parser.
@@ -224,7 +225,7 @@ asx_open_stream(struct input_stream *is)
if (nbytes == 0) {
if (error2.IsDefined()) {
g_markup_parse_context_free(context);
- g_warning("%s", error2.GetMessage());
+ LogError(error2);
return NULL;
}
@@ -234,7 +235,8 @@ asx_open_stream(struct input_stream *is)
success = g_markup_parse_context_parse(context, buffer, nbytes,
&error);
if (!success) {
- g_warning("XML parser failed: %s", error->message);
+ FormatErrno(asx_domain,
+ "XML parser failed: %s", error->message);
g_error_free(error);
g_markup_parse_context_free(context);
return NULL;
@@ -243,7 +245,8 @@ asx_open_stream(struct input_stream *is)
success = g_markup_parse_context_end_parse(context, &error);
if (!success) {
- g_warning("XML parser failed: %s", error->message);
+ FormatErrno(asx_domain,
+ "XML parser failed: %s", error->message);
g_error_free(error);
g_markup_parse_context_free(context);
return NULL;