Skip to content

fix(prefix): PrefixPrinter now uses updated defaultWriter#752

Merged
MarvinJWendt merged 1 commit intopterm:masterfrom
christeredvartsen:prefix-writer
Feb 25, 2026
Merged

fix(prefix): PrefixPrinter now uses updated defaultWriter#752
MarvinJWendt merged 1 commit intopterm:masterfrom
christeredvartsen:prefix-writer

Conversation

@christeredvartsen
Copy link
Contributor

@christeredvartsen christeredvartsen commented Nov 11, 2025

When calling pterm.SetDefaultOuput(writer), the prefix printers initialized by pterm did not use the new default.

This commit changes this behaviour, and the prefix printers will now use whatever is set as the defaultWriter unless a specific writer has been set using the WithWriter(writer) method on the PrefixPrinter, in which case it will use that printer.

Fixes #751
Fixes #701

When calling pterm.SetDefaultOuput(writer), the prefix printers
initialized by pterm did not use the new default.

This commit changes this behaviour, and the prefix printers will now use
whatever is set as the defaultWriter unless a specific writer has been
set using the WithWriter(writer) method on the PrefixPrinter, in which
case it will use that printer.

Closes #751
@christeredvartsen
Copy link
Contributor Author

There seems to be failures in the master branch already, so not sure what to do with that...

Copy link
Member

@MarvinJWendt MarvinJWendt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for contributing 🚀

(Sorry for the delay)

@MarvinJWendt MarvinJWendt merged commit bcb9c07 into pterm:master Feb 25, 2026
3 of 4 checks passed
@christeredvartsen christeredvartsen deleted the prefix-writer branch February 28, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PrefixPrinter does not use changed defaultWriter SetDefaultOutput not working after commit 825931aa7ab264074e6c4045c3bdbca5482c758c

2 participants