logging: make libi3 use verboselog()/errorlog(), provide it in each caller

While this is a bit ugly, it makes the log messages end up where they
are supposed to: in the shmlog/stdout in case of i3 and on stdout in
case of utilities such as i3-input
This commit is contained in:
Michael Stapelberg
2012-08-13 13:27:00 +02:00
parent 6c9bf84d4e
commit 2896ae8057
6 changed files with 88 additions and 7 deletions

View File

@ -38,13 +38,12 @@ static double pango_font_blue;
static bool load_pango_font(i3Font *font, const char *desc) {
/* Load the font description */
font->specific.pango_desc = pango_font_description_from_string(desc);
if (!font->specific.pango_desc)
{
if (!font->specific.pango_desc) {
ELOG("Could not open font %s with Pango, fallback to X font.\n", desc);
return false;
}
LOG("Using Pango font %s, size %d",
LOG("Using Pango font %s, size %d\n",
pango_font_description_get_family(font->specific.pango_desc),
pango_font_description_get_size(font->specific.pango_desc)
);
@ -186,7 +185,7 @@ i3Font load_font(const char *pattern, const bool fallback) {
}
}
LOG("Using X font %s", pattern);
LOG("Using X font %s\n", pattern);
/* Get information (height/name) for this font */
if (!(font.specific.xcb.info = xcb_query_font_reply(conn, info_cookie, NULL)))