aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/MikmodDecoderPlugin.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/decoder/MikmodDecoderPlugin.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/decoder/MikmodDecoderPlugin.cxx')
-rw-r--r--src/decoder/MikmodDecoderPlugin.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/decoder/MikmodDecoderPlugin.cxx b/src/decoder/MikmodDecoderPlugin.cxx
index 78a26891a..fb82eb732 100644
--- a/src/decoder/MikmodDecoderPlugin.cxx
+++ b/src/decoder/MikmodDecoderPlugin.cxx
@@ -22,13 +22,14 @@
#include "DecoderAPI.hxx"
#include "tag/TagHandler.hxx"
#include "system/FatalError.hxx"
+#include "util/Domain.hxx"
+#include "Log.hxx"
#include <glib.h>
#include <mikmod.h>
#include <assert.h>
-#undef G_LOG_DOMAIN
-#define G_LOG_DOMAIN "mikmod"
+static constexpr Domain mikmod_domain("mikmod");
/* this is largely copied from alsaplayer */
@@ -127,8 +128,9 @@ mikmod_decoder_init(const config_param &param)
DMODE_16BITS);
if (MikMod_Init(params)) {
- g_warning("Could not init MikMod: %s\n",
- MikMod_strerror(MikMod_errno));
+ FormatError(mikmod_domain,
+ "Could not init MikMod: %s",
+ MikMod_strerror(MikMod_errno));
return false;
}
@@ -154,7 +156,8 @@ mikmod_decoder_file_decode(struct decoder *decoder, const char *path_fs)
g_free(path2);
if (handle == nullptr) {
- g_warning("failed to open mod: %s", path_fs);
+ FormatError(mikmod_domain,
+ "failed to open mod: %s", path_fs);
return;
}
@@ -187,7 +190,8 @@ mikmod_decoder_scan_file(const char *path_fs,
if (handle == nullptr) {
g_free(path2);
- g_debug("Failed to open file: %s", path_fs);
+ FormatDebug(mikmod_domain,
+ "Failed to open file: %s", path_fs);
return false;
}