Skip to content

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

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

MarvinJWendt merged 1 commit into
pterm:masterfrom
christeredvartsen:prefix-writer

Conversation

@christeredvartsen

@christeredvartsen christeredvartsen commented Nov 11, 2025 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

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

@MarvinJWendt MarvinJWendt left a comment

Copy link
Copy Markdown
Member

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)

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