#451·consola

FancyReporter should allow configuration of newline wrapping

Author: boneskullCreated Sep 18, 2026Updated Sep 18, 2026
Labelsenhancement

Describe the feature

FancyReporter is hardcoded to wrap log output in newlines (pre/post) if the log level is less than 2 (warn or below):

https://github.com/unjs/consola/blob/c47faac1738b7383971c6c20b5a34ffa15e7cc3b/src/reporters/fancy.ts#L108

and

https://github.com/unjs/consola/blob/c47faac1738b7383971c6c20b5a34ffa15e7cc3b/src/reporters/fancy.ts#L133

Because FancyReporter is not exported, I cannot easily override this behavior in a subclass, as I'd like everything else FancyReporter is doing.

I have a situation where I'm logging warnings in sequence which ends up inserting double-newlines between each message:

Image
  • Expose FancyReporter (ref: #181)
  • Suppress extra-newline behavior if compact flag is truthy

Additional information

  • Would you be willing to help implement this feature?