Label console lines with the full level name - #571
Conversation
Render each level through the console output templates with the same formatter
the console sink uses, and assert on the label.
19 of 21 fail: the templates use {Level:u3}, so lines are labelled DBG, INF,
WRN and so on.
Part of Fallout-build#570
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Replace {Level:u3} with {Level} in the two console output templates, so lines
read [Debug] and [Information] instead of [DBG] and [INF].
The codes bought a fixed-width level column. That alignment is not preserved
here: laying out a real column belongs to Fallout-build#391, where Spectre owns the frame and
can indent instead of truncating the words.
Scope is the console templates. The build.log file templates keep their compact
single-letter column format.
Closes Fallout-build#570
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
this one im not sure about yet, I could imagine a lot of people would be pissed off because they love it when things are aligned. But then I'd argue we could just do [I] [W] [E] [D] [T] etc. |
|
Hmm.. I would definitely vote for the "one-letter"-thing, despite I don't get what "T" stands for? |
Trace
This is part of a bigger refactoring around introducing |
Replaces the three-letter level codes in console output with the level names.
VRB,DBG,INF,WRN,ERRandFTLare not self-explaining.What changed
{Level:u3}becomes{Level}in the two console output templates.OutputTemplateLevelSpecs, covering every level for both templates through the same formatter the console sink uses.Before and after, same build:
The errors-and-warnings summary block picks it up too, since it shares a template.
Why
The codes existed to keep the level column a fixed width so the messages lined up. That alignment is deliberately not preserved here. Laying out a real column belongs to #391, where Spectre owns the frame and can indent properly rather than truncating the words. Padding the level to a fixed width is a one-token change (
{Level,-11}) if a reviewer would rather have ragged-free columns in the meantime.Two notes on scope:
build.logfile templates are unchanged. They use a compact{Level:u1}single-letter column in a pipe-delimited, fixed-width layout. That format is for scanning and diffing a log file, not for reading along with a build.Leveltoken by the console sink regardless of format, so it is unaffected.Verification
dotnet testonFallout.Build.SpecsandFallout.Common.Specs. 21 new specs pass, 19 of which failed before the change. Confirmed against a real build run, including the errors-and-warnings block.Closes #570