Skip to content

Label console lines with the full level name - #571

Draft
ChrisonSimtian wants to merge 2 commits into
Fallout-build:mainfrom
ChrisonSimtian:feature/full-level-names
Draft

Label console lines with the full level name#571
ChrisonSimtian wants to merge 2 commits into
Fallout-build:mainfrom
ChrisonSimtian:feature/full-level-names

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Replaces the three-letter level codes in console output with the level names. VRB, DBG, INF, WRN, ERR and FTL are not self-explaining.

What changed

  • {Level:u3} becomes {Level} in the two console output templates.
  • Add OutputTemplateLevelSpecs, covering every level for both templates through the same formatter the console sink uses.

Before and after, same build:

22:49:44 [DBG] git version 2.50.1        01:43:13 [Debug] git version 2.50.1
22:49:44 [INF] > /usr/bin/git --version  01:43:13 [Information] > /usr/bin/git --version
22:49:44 [WRN] a warning line            01:43:13 [Warning] a warning line
22:49:44 [ERR] an error line             01:43:13 [Error] an error line

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:

  • The build.log file 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.
  • Nothing depended on the abbreviations — no Verify snapshots, no docs, no CI annotation path, no log parsing. Level colouring is applied to the Level token by the console sink regardless of format, so it is unaffected.

Verification

dotnet test on Fallout.Build.Specs and Fallout.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

ChrisonSimtian and others added 2 commits July 27, 2026 01:41
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>
@ChrisonSimtian ChrisonSimtian added enhancement New feature or request target/vCurrent Targets the current version labels Jul 26, 2026
@ChrisonSimtian

Copy link
Copy Markdown
Collaborator Author

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.

@IT-VBFK

IT-VBFK commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Hmm.. I would definitely vote for the "one-letter"-thing, despite I don't get what "T" stands for?

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator Author

Hmm.. I would definitely vote for the "one-letter"-thing, despite I don't get what "T" stands for?

Trace
Log / Verbosity levels are usually (free after ILogger):

  • [E]xception or [E]rror
  • [W]arning
  • [I]nformation
  • [D]ebug
  • [T]race

This is part of a bigger refactoring around introducing ILogger as an abstraction layer and making use of Serilog (which is already being used)
At some point, at least thats my vision, the output is purely cosmetic sugar and YOU can bring your own renderer (or override the stock standard one to fit your flavour)
The log output itself ideally comes as NDJson, which can be picked up by heaps of other tooling like AI or all sorts of CI runners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request target/vCurrent Targets the current version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Print full level names in console output instead of three-letter abbreviations

2 participants