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/output/FifoOutputPlugin.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/output/FifoOutputPlugin.cxx')
-rw-r--r-- | src/output/FifoOutputPlugin.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/output/FifoOutputPlugin.cxx b/src/output/FifoOutputPlugin.cxx index 34199bff9..babda5f9e 100644 --- a/src/output/FifoOutputPlugin.cxx +++ b/src/output/FifoOutputPlugin.cxx @@ -27,19 +27,15 @@ #include "fs/FileSystem.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" +#include "Log.hxx" #include "open.h" -#include <glib.h> - #include <sys/types.h> #include <sys/stat.h> #include <errno.h> #include <string.h> #include <unistd.h> -#undef G_LOG_DOMAIN -#define G_LOG_DOMAIN "fifo" - #define FIFO_BUFFER_SIZE 65536 /* pipe capacity on Linux >= 2.6.11 */ struct FifoOutput { @@ -78,11 +74,13 @@ static constexpr Domain fifo_output_domain("fifo_output"); inline void FifoOutput::Delete() { - g_debug("Removing FIFO \"%s\"", path_utf8.c_str()); + FormatDebug(fifo_output_domain, + "Removing FIFO \"%s\"", path_utf8.c_str()); if (!RemoveFile(path)) { - g_warning("Could not remove FIFO \"%s\": %s", - path_utf8.c_str(), g_strerror(errno)); + FormatErrno(fifo_output_domain, + "Could not remove FIFO \"%s\"", + path_utf8.c_str()); return; } @@ -249,8 +247,9 @@ fifo_output_cancel(struct audio_output *ao) bytes = read(fd->input, buf, FIFO_BUFFER_SIZE); if (bytes < 0 && errno != EAGAIN) { - g_warning("Flush of FIFO \"%s\" failed: %s", - fd->path_utf8.c_str(), g_strerror(errno)); + FormatErrno(fifo_output_domain, + "Flush of FIFO \"%s\" failed", + fd->path_utf8.c_str()); } } |