Use the thread name to identify threads in the journal

This makes the journal easier to read, and makes journals
from the nightly build easier to diff.

Since we use only the 10 first characters of the name,
abridge existing thread names to make them unique within
that many characters.
This commit is contained in:
Ron Koenderink 2008-09-11 14:49:28 -06:00
parent 2ddeda99d0
commit effc1b187a
2 changed files with 2 additions and 2 deletions

View file

@ -83,7 +83,7 @@ journal_entry(char *fmt, ...)
if (journal) {
time(&now);
fprintf(journal, "%.24s %p ", ctime(&now), empth_self());
fprintf(journal, "%.24s %10.10s:", ctime(&now), empth_name());
va_start(ap, fmt);
vsnprintf(buf, sizeof(buf) - 1, fmt, ap);