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:
parent
2ddeda99d0
commit
effc1b187a
2 changed files with 2 additions and 2 deletions
|
@ -213,7 +213,7 @@ player_accept(void *unused)
|
|||
stacksize = 100000
|
||||
/* budget */ + MAX(WORLD_SZ() * sizeof(int) * 7,
|
||||
/* power */ MAXNOC * sizeof(struct powstr));
|
||||
sprintf(buf, "Player (fd #%d)", ns);
|
||||
sprintf(buf, "Conn%d", ns);
|
||||
empth_create(player_login, stacksize, 0, buf, np);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue