aboutsummaryrefslogtreecommitdiffstats
path: root/src/InotifySource.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/InotifySource.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 '')
-rw-r--r--src/InotifySource.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/InotifySource.cxx b/src/InotifySource.cxx
index c6f0ae4db..587625d3d 100644
--- a/src/InotifySource.cxx
+++ b/src/InotifySource.cxx
@@ -19,19 +19,17 @@
#include "config.h"
#include "InotifySource.hxx"
+#include "InotifyDomain.hxx"
#include "util/fifo_buffer.h"
#include "util/Error.hxx"
#include "system/fd_util.h"
#include "system/FatalError.hxx"
+#include "Log.hxx"
#include <glib.h>
#include <sys/inotify.h>
#include <unistd.h>
-#include <errno.h>
-
-#undef G_LOG_DOMAIN
-#define G_LOG_DOMAIN "inotify"
bool
InotifySource::OnSocketReady(gcc_unused unsigned flags)
@@ -120,8 +118,7 @@ InotifySource::Remove(unsigned wd)
{
int ret = inotify_rm_watch(Get(), wd);
if (ret < 0 && errno != EINVAL)
- g_warning("inotify_rm_watch() has failed: %s",
- g_strerror(errno));
+ LogErrno(inotify_domain, "inotify_rm_watch() has failed");
/* EINVAL may happen here when the file has been deleted; the
kernel seems to auto-unregister deleted files */