Skip to content

Create a simple logger for output#25

Merged
rboston628 merged 3 commits intomainfrom
make-logger
Aug 4, 2025
Merged

Create a simple logger for output#25
rboston628 merged 3 commits intomainfrom
make-logger

Conversation

@rboston628
Copy link
Owner

@rboston628 rboston628 commented Aug 4, 2025

Thrain previously had written all output directly to stdout using printf. This made it hard to silence or redirect output.

This creates a simple logger with four levels, and updates the program to write with this instead printf. Output is written almost identically to how printf works, including a format string with variadic arguments.

A set of comprehensive tests ensures the logger works as expected.

It is in principle possible to silence all output or to redirect it to a local file instead of the screen. A future update should add that feature to the command line args.

@rboston628 rboston628 merged commit 8ef01c1 into main Aug 4, 2025
7 checks passed
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