aboutsummaryrefslogtreecommitdiffstats
path: root/src/MixerAll.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/MixerAll.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/MixerAll.cxx')
-rw-r--r--src/MixerAll.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/MixerAll.cxx b/src/MixerAll.cxx
index 8005655e5..e9994e901 100644
--- a/src/MixerAll.cxx
+++ b/src/MixerAll.cxx
@@ -26,13 +26,12 @@
#include "pcm/PcmVolume.hxx"
#include "OutputInternal.hxx"
#include "util/Error.hxx"
-
-#include <glib.h>
+#include "util/Domain.hxx"
+#include "Log.hxx"
#include <assert.h>
-#undef G_LOG_DOMAIN
-#define G_LOG_DOMAIN "mixer"
+static constexpr Domain mixer_domain("mixer");
static int
output_mixer_get_volume(unsigned i)
@@ -53,8 +52,9 @@ output_mixer_get_volume(unsigned i)
Error error;
volume = mixer_get_volume(mixer, error);
if (volume < 0 && error.IsDefined())
- g_warning("Failed to read mixer for '%s': %s",
- output->name, error.GetMessage());
+ FormatError(error,
+ "Failed to read mixer for '%s'",
+ output->name);
return volume;
}
@@ -99,8 +99,9 @@ output_mixer_set_volume(unsigned i, unsigned volume)
Error error;
success = mixer_set_volume(mixer, volume, error);
if (!success && error.IsDefined())
- g_warning("Failed to set mixer for '%s': %s",
- output->name, error.GetMessage());
+ FormatError(error,
+ "Failed to set mixer for '%s'",
+ output->name);
return success;
}