replace remaining printf()s with D?LOG

fixes #1252
This commit is contained in:
Michael Stapelberg 2014-06-08 21:56:14 +02:00
parent 030595a4eb
commit 617afc67a2
5 changed files with 18 additions and 18 deletions

View File

@ -359,7 +359,7 @@ void cmd_criteria_add(I3_CMD, char *ctype, char *cvalue) {
ELOG("Could not parse con id \"%s\"\n", cvalue);
} else {
current_match->con_id = (Con*)parsed;
printf("id as int = %p\n", current_match->con_id);
DLOG("id as int = %p\n", current_match->con_id);
}
return;
}
@ -374,7 +374,7 @@ void cmd_criteria_add(I3_CMD, char *ctype, char *cvalue) {
ELOG("Could not parse window id \"%s\"\n", cvalue);
} else {
current_match->id = parsed;
printf("window id as int = %d\n", current_match->id);
DLOG("window id as int = %d\n", current_match->id);
}
return;
}

View File

@ -69,7 +69,7 @@ CFGFUN(criteria_add, const char *ctype, const char *cvalue) {
ELOG("Could not parse con id \"%s\"\n", cvalue);
} else {
current_match->con_id = (Con*)parsed;
printf("id as int = %p\n", current_match->con_id);
DLOG("id as int = %p\n", current_match->con_id);
}
return;
}
@ -84,7 +84,7 @@ CFGFUN(criteria_add, const char *ctype, const char *cvalue) {
ELOG("Could not parse window id \"%s\"\n", cvalue);
} else {
current_match->id = parsed;
printf("window id as int = %d\n", current_match->id);
DLOG("window id as int = %d\n", current_match->id);
}
return;
}

View File

@ -687,7 +687,7 @@ static int detect_version(char *buf) {
strncasecmp(line, "force_focus_wrapping", strlen("force_focus_wrapping")) == 0 ||
strncasecmp(line, "# i3 config file (v4)", strlen("# i3 config file (v4)")) == 0 ||
strncasecmp(line, "workspace_layout", strlen("workspace_layout")) == 0) {
printf("deciding for version 4 due to this line: %.*s\n", (int)(walk-line), line);
LOG("deciding for version 4 due to this line: %.*s\n", (int)(walk-line), line);
return 4;
}
@ -719,7 +719,7 @@ static int detect_version(char *buf) {
strncasecmp(bind, "border borderless", strlen("border borderless")) == 0 ||
strncasecmp(bind, "--no-startup-id", strlen("--no-startup-id")) == 0 ||
strncasecmp(bind, "bar", strlen("bar")) == 0) {
printf("deciding for version 4 due to this line: %.*s\n", (int)(walk-line), line);
LOG("deciding for version 4 due to this line: %.*s\n", (int)(walk-line), line);
return 4;
}
}
@ -987,12 +987,12 @@ void parse_file(const char *f) {
free(new);
new = converted;
} else {
printf("\n");
printf("**********************************************************************\n");
printf("ERROR: Could not convert config file. Maybe i3-migrate-config-to-v4\n");
printf("was not correctly installed on your system?\n");
printf("**********************************************************************\n");
printf("\n");
LOG("\n");
LOG("**********************************************************************\n");
LOG("ERROR: Could not convert config file. Maybe i3-migrate-config-to-v4\n");
LOG("was not correctly installed on your system?\n");
LOG("**********************************************************************\n");
LOG("\n");
}
}

View File

@ -86,13 +86,13 @@ bool tree_restore(const char *path, xcb_get_geometry_reply_t *geometry) {
tree_append_json(focused, globbed, NULL);
printf("appended tree, using new root\n");
DLOG("appended tree, using new root\n");
croot = TAILQ_FIRST(&(croot->nodes_head));
printf("new root = %p\n", croot);
DLOG("new root = %p\n", croot);
Con *out = TAILQ_FIRST(&(croot->nodes_head));
printf("out = %p\n", out);
DLOG("out = %p\n", out);
Con *ws = TAILQ_FIRST(&(out->nodes_head));
printf("ws = %p\n", ws);
DLOG("ws = %p\n", ws);
/* For in-place restarting into v4.2, we need to make sure the new
* pseudo-output __i3 is present. */

View File

@ -260,7 +260,7 @@ char *store_restart_layout(void) {
return NULL;
}
if (n == 0) {
printf("write == 0?\n");
DLOG("write == 0?\n");
free(filename);
close(fd);
return NULL;
@ -271,7 +271,7 @@ char *store_restart_layout(void) {
close(fd);
if (length > 0) {
printf("layout: %.*s\n", (int)length, payload);
DLOG("layout: %.*s\n", (int)length, payload);
}
y(free);