From: Michael Stapelberg Date: Sat, 14 Dec 2013 15:28:54 +0000 (+0100) Subject: load_layout.c: use *LOG instead of (f)printf X-Git-Tag: 4.8~194 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fcf869439cad67e4f29e1a71fd267e5cd67d35b1;p=i3%2Fi3 load_layout.c: use *LOG instead of (f)printf --- diff --git a/src/load_layout.c b/src/load_layout.c index b69f8ac5..11a8f974 100644 --- a/src/load_layout.c +++ b/src/load_layout.c @@ -338,8 +338,8 @@ static int json_int(void *ctx, long val) { r->width = val; else if (strcasecmp(last_key, "height") == 0) r->height = val; - else printf("WARNING: unknown key %s in rect\n", last_key); - printf("rect now: (%d, %d, %d, %d)\n", + else ELOG("WARNING: unknown key %s in rect\n", last_key); + DLOG("rect now: (%d, %d, %d, %d)\n", r->x, r->y, r->width, r->height); } if (parsing_swallows) { @@ -433,8 +433,8 @@ void tree_append_json(const char *filename) { stat = yajl_parse(hand, (const unsigned char*)buf, n); if (stat != yajl_status_ok) { - unsigned char * str = yajl_get_error(hand, 1, (const unsigned char*)buf, n); - fprintf(stderr, "%s\n", (const char *) str); + unsigned char *str = yajl_get_error(hand, 1, (const unsigned char*)buf, n); + ELOG("JSON parsing error: %s\n", str); yajl_free_error(hand, str); }