aboutsummaryrefslogtreecommitdiffstats
path: root/src/Listen.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/Listen.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/Listen.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Listen.cxx b/src/Listen.cxx
index 1c240353d..6438d3ed4 100644
--- a/src/Listen.cxx
+++ b/src/Listen.cxx
@@ -27,7 +27,9 @@
#include "ConfigOption.hxx"
#include "event/ServerSocket.hxx"
#include "util/Error.hxx"
+#include "util/Domain.hxx"
#include "fs/Path.hxx"
+#include "Log.hxx"
#include <glib.h>
@@ -38,8 +40,7 @@
#include <systemd/sd-daemon.h>
#endif
-#undef G_LOG_DOMAIN
-#define G_LOG_DOMAIN "listen"
+static constexpr Domain listen_domain("listen");
#define DEFAULT_PORT 6600
@@ -82,8 +83,8 @@ listen_systemd_activation(Error &error_r)
int n = sd_listen_fds(true);
if (n <= 0) {
if (n < 0)
- g_warning("sd_listen_fds() failed: %s",
- g_strerror(-n));
+ FormatErrno(listen_domain, -n,
+ "sd_listen_fds() failed");
return false;
}
@@ -155,7 +156,7 @@ listen_global_init(Error &error)
void listen_global_finish(void)
{
- g_debug("listen_global_finish called");
+ LogDebug(listen_domain, "listen_global_finish called");
assert(listen_socket != NULL);