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/ShoutOutputPlugin.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/ShoutOutputPlugin.cxx')
-rw-r--r-- | src/output/ShoutOutputPlugin.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/output/ShoutOutputPlugin.cxx b/src/output/ShoutOutputPlugin.cxx index 836ba4b4c..19f2b61cd 100644 --- a/src/output/ShoutOutputPlugin.cxx +++ b/src/output/ShoutOutputPlugin.cxx @@ -26,6 +26,7 @@ #include "util/Error.hxx" #include "util/Domain.hxx" #include "system/FatalError.hxx" +#include "Log.hxx" #include <shout/shout.h> #include <glib.h> @@ -35,9 +36,6 @@ #include <string.h> #include <stdio.h> -#undef G_LOG_DOMAIN -#define G_LOG_DOMAIN "shout" - static constexpr unsigned DEFAULT_CONN_TIMEOUT = 2; struct ShoutOutput final { @@ -358,8 +356,9 @@ static void close_shout_conn(ShoutOutput * sd) if (shout_get_connected(sd->shout_conn) != SHOUTERR_UNCONNECTED && shout_close(sd->shout_conn) != SHOUTERR_SUCCESS) { - g_warning("problem closing connection to shout server: %s\n", - shout_get_error(sd->shout_conn)); + FormatWarning(shout_output_domain, + "problem closing connection to shout server: %s", + shout_get_error(sd->shout_conn)); } } @@ -507,7 +506,7 @@ static void my_shout_set_tag(struct audio_output *ao, if (!encoder_pre_tag(sd->encoder, error) || !write_page(sd, error) || !encoder_tag(sd->encoder, tag, error)) { - g_warning("%s", error.GetMessage()); + LogError(error); return; } } else { @@ -518,7 +517,8 @@ static void my_shout_set_tag(struct audio_output *ao, shout_metadata_add(sd->shout_meta, "song", song); if (SHOUTERR_SUCCESS != shout_set_metadata(sd->shout_conn, sd->shout_meta)) { - g_warning("error setting shout metadata\n"); + LogWarning(shout_output_domain, + "error setting shout metadata"); } } |