unjs / consola

🐨 Elegant Console Logger for Node.js and Browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The new underlining feature from #191 is a breaking change

trevor-vaughan opened this issue · comments

Environment

All

Reproduction

logger = require('consola')

myobj = { foo: 'my_content', bar: 'should_not_be_underlined' }
logger.log(myobj)

3.1.0 Output

{ foo: 'my_content', bar: 'should_not_be_underlined' }

3.2.0 Output

{ foo: 'mycontent', bar: 'shouldnotbeunderlined' }

Describe the bug

The console output from 3.2.0 does not match the output from 3.1.0.

Ideally, fancy formatting would be opt-in instead of opt-out at runtime.

Additional context

No response

Logs

No response

Ah, I see that I should use consola/basic instead.

Ah, no, I need to re-open this. I want the fancy formatting in terms of error messages, etc. But I definitely do not want object dumps to be processed as "fancy".

Hmm...this also causes issues with something as simple as My file names are some_thing.jpg and foo_bar.jpg

I would definitely prefer an opt-in to any delimiter-based options on a per-message basis. Otherwise, any dynamic content could cause a mess on output.

Sorry for the regression. Fixing soon

image

@pi0 No worries, appreciate both the awesome tool and rapid response :-D.

FWIW, I do like the concept that was introduced, I just think that it needs to be selectively opt-in.

No worries. Can you please test with latest version? Is it still problematic for you?

@pi0 Good to go! Appreciate the quick turnaround.