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/DecoderThread.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/DecoderThread.cxx')
-rw-r--r-- | src/DecoderThread.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/DecoderThread.cxx b/src/DecoderThread.cxx index 2c07689df..1aa60ce3f 100644 --- a/src/DecoderThread.cxx +++ b/src/DecoderThread.cxx @@ -33,15 +33,16 @@ #include "DecoderList.hxx" #include "util/UriUtil.hxx" #include "util/Error.hxx" +#include "util/Domain.hxx" #include "tag/ApeReplayGain.hxx" +#include "Log.hxx" #include <glib.h> #include <unistd.h> #include <stdio.h> /* for SEEK_SET */ -#undef G_LOG_DOMAIN -#define G_LOG_DOMAIN "decoder_thread" +static constexpr Domain decoder_thread_domain("decoder_thread"); /** * Marks the current decoder command as "finished" and notifies the @@ -78,7 +79,7 @@ decoder_input_stream_open(struct decoder_control *dc, const char *uri) input_stream *is = input_stream::Open(uri, dc->mutex, dc->cond, error); if (is == NULL) { if (error.IsDefined()) - g_warning("%s", error.GetMessage()); + LogError(error); return NULL; } @@ -99,7 +100,7 @@ decoder_input_stream_open(struct decoder_control *dc, const char *uri) if (!is->Check(error)) { dc->Unlock(); - g_warning("%s", error.GetMessage()); + LogError(error); return NULL; } @@ -122,7 +123,7 @@ decoder_stream_decode(const struct decoder_plugin *plugin, assert(input_stream->ready); assert(decoder->dc->state == DecoderState::START); - g_debug("probing plugin %s", plugin->name); + FormatDebug(decoder_thread_domain, "probing plugin %s", plugin->name); if (decoder->dc->command == DecoderCommand::STOP) return true; @@ -155,7 +156,7 @@ decoder_file_decode(const struct decoder_plugin *plugin, assert(g_path_is_absolute(path)); assert(decoder->dc->state == DecoderState::START); - g_debug("probing plugin %s", plugin->name); + FormatDebug(decoder_thread_domain, "probing plugin %s", plugin->name); if (decoder->dc->command == DecoderCommand::STOP) return true; |