Attention is currently required from: Raul Rangel, Nico Huber, Patrick Georgi, Kyösti Mälkki. Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/61306 )
Change subject: console: Add loglevel prefix to interactive consoles ......................................................................
Patch Set 5:
(3 comments)
File src/console/printk.c:
https://review.coreboot.org/c/coreboot/+/61306/comment/fd65199e_06322cfc PS5, Line 80: console_interactive_tx_byte
Might be cleaner to add a `static interactive_printk(fmt, args)`. […]
Yeah... well you can't build a va_list from scratch in C (and you shouldn't try to fake it with a pointer because the format can be architecture-dependent), but I can write another vararg wrapper just for this here. I guess it does look a bit cleaner... I'm just worried because each of these things adds a little bit of overhead again and I was trying to be explicitly lightweight with my changes to such a central piece of code. Putting the vtxprintf() here means it parses the format string every time even if there's no interactive console to print to.
I guess if you do have an interactive console, that level of overhead wouldn't matter. And if you don't, it would be best if I could compile-time eliminate all of this anyway. I'll do that in a follow-up patch.
https://review.coreboot.org/c/coreboot/+/61306/comment/dfdde803_8d092248 PS5, Line 80: console_interactive_tx_byte
Might be cleaner to add a `static interactive_printk(fmt, args)`. […]
Done
https://review.coreboot.org/c/coreboot/+/61306/comment/98e98463_2d7f47fc PS5, Line 85:
nit: Do we need two spaces?
This was my personal preference choice after playing around with various distances... I feel that with one space, the prefixes visually merge too much into the log text and it makes it harder to read the messages you're actually interested in without getting distracted by the clutter on the left. I'm open to discuss alternatives but please run it and look at the output first so you know how it looks in practice. (If anything, I'd suggest rather going up to 3 spaces than back down to 1, though. I don't want to make the distance too large since I want to be conscious of people with small terminals, too.)