Skip to content

Write log lines in the shared session log format and fix the -v flag - #19

Merged
rodchristiansen merged 1 commit into
mainfrom
feature/log-convention
Sep 1, 2026
Merged

Write log lines in the shared session log format and fix the -v flag#19
rodchristiansen merged 1 commit into
mainfrom
feature/log-convention

Conversation

@rodchristiansen

Copy link
Copy Markdown
Contributor

Summary

  • Log-file lines are now [yyyy-MM-dd HH:mm:ss] LEVEL message in local time, with the level left-aligned in a five-character column and limited to DEBUG, INFO, WARN and ERROR. Section, progress, success and skipped markers are written as INFO lines that carry the marker text in the message. Console output keeps its icons and is unchanged.
  • -v was matched as the version switch before it could be read as verbose, so managedbootstrapinstall.exe -v printed the version and exited. -v and --verbose now both mean verbose; --version and -V print the version. Help text and README updated.
  • The 30-day retention sweep in Logger.Initialize is already in place and is unchanged; the README now documents it alongside the line format.

Verification

  • dotnet build BootstrapMate.csproj -p:EnableWindowsTargeting=true succeeds (only the two pre-existing warnings).
  • Exercised Logger.cs in a throwaway harness against a temp directory: every emitted line matches ^\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] (DEBUG|INFO |WARN |ERROR) , a 31-day-old .log is deleted, a 29-day-old one is kept, and non-.log files are untouched.
  • Not verified here: the locked-file skip in the sweep, which relies on Windows sharing semantics.

Log-file lines are now "[yyyy-MM-dd HH:mm:ss] LEVEL message" in local time,
with the level left-aligned in a five-character column and limited to DEBUG,
INFO, WARN and ERROR. Section, progress, success and skipped markers are
written as INFO lines that carry the marker in the message; the console
output keeps its icons and is unchanged.

The 30-day retention sweep at logger initialisation is already in place and
is unchanged; the README now documents it alongside the line format.

"-v" was matched as the version switch before it could be read as verbose, so
"managedbootstrapinstall.exe -v" printed the version and exited. "-v" and
"--verbose" now both mean verbose; "--version" and "-V" print the version.
@rodchristiansen
rodchristiansen marked this pull request as ready for review September 1, 2026 23:53
@rodchristiansen
rodchristiansen merged commit 4b5f50f into main Sep 1, 2026
2 checks passed
@rodchristiansen
rodchristiansen deleted the feature/log-convention branch September 1, 2026 23:54
rodchristiansen added a commit that referenced this pull request Sep 2, 2026
…19)

Log-file lines are now "[yyyy-MM-dd HH:mm:ss] LEVEL message" in local time,
with the level left-aligned in a five-character column and limited to DEBUG,
INFO, WARN and ERROR. Section, progress, success and skipped markers are
written as INFO lines that carry the marker in the message; the console
output keeps its icons and is unchanged.

The 30-day retention sweep at logger initialisation is already in place and
is unchanged; the README now documents it alongside the line format.

"-v" was matched as the version switch before it could be read as verbose, so
"managedbootstrapinstall.exe -v" printed the version and exited. "-v" and
"--verbose" now both mean verbose; "--version" and "-V" print the version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant