Only printout class name in tracing, if one is available
Makes debug output much more pleasant.
This commit is contained in:
parent
98619ce4fa
commit
85f73fa8da
|
@ -531,8 +531,12 @@ _hb_debug_msg_va (const char *what,
|
||||||
else
|
else
|
||||||
fprintf (stderr, " ├╴");
|
fprintf (stderr, " ├╴");
|
||||||
|
|
||||||
if (func)
|
if (func) {
|
||||||
fprintf (stderr, "%s: ", func);
|
/* If there's a class name, just write that. */
|
||||||
|
const char *dotdot = strstr (func, "::");
|
||||||
|
unsigned int func_len = dotdot ? dotdot - func : strlen (func);
|
||||||
|
fprintf (stderr, "%*s: ", func_len, func);
|
||||||
|
}
|
||||||
|
|
||||||
if (message)
|
if (message)
|
||||||
vfprintf (stderr, message, ap);
|
vfprintf (stderr, message, ap);
|
||||||
|
|
Loading…
Reference in New Issue