Log: new logging library API

Prepare to migrate away from GLib.  Currently, we're still using GLib
as a backend.
This commit is contained in:
Max Kellermann
2013-09-27 22:31:24 +02:00
parent c53492a76a
commit 060814daa8
162 changed files with 1992 additions and 1280 deletions

View File

@@ -24,6 +24,7 @@
#include "InputStream.hxx"
#include "InputPlugin.hxx"
#include "tag/Tag.hxx"
#include "Log.hxx"
extern "C" {
#include <despotify.h>
@@ -85,7 +86,7 @@ refill_buffer(DespotifyInputStream *ctx)
break;
if (rc < 0) {
g_debug("despotify_get_pcm error\n");
LogDebug(despotify_domain, "despotify_get_pcm error");
ctx->eof = true;
break;
}
@@ -108,14 +109,14 @@ static void callback(gcc_unused struct despotify_session* ds,
break;
case DESPOTIFY_TRACK_PLAY_ERROR:
g_debug("Track play error\n");
LogWarning(despotify_domain, "Track play error");
ctx->eof = true;
ctx->len_available = 0;
break;
case DESPOTIFY_END_OF_PLAYLIST:
ctx->eof = true;
g_debug("End of playlist: %d\n", ctx->eof);
FormatDebug(despotify_domain, "End of playlist: %d", ctx->eof);
break;
}
}
@@ -139,7 +140,7 @@ input_despotify_open(const char *url,
ds_link = despotify_link_from_uri(url + 6);
if (!ds_link) {
g_debug("Can't find %s\n", url);
FormatDebug(despotify_domain, "Can't find %s", url);
return NULL;
}
if (ds_link->type != LINK_TYPE_TRACK) {