-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add docs about raw method #271
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #271 +/- ##
==========================================
- Coverage 61.13% 61.08% -0.05%
==========================================
Files 13 13
Lines 1379 1380 +1
Branches 58 58
==========================================
Hits 843 843
- Misses 536 537 +1 β View full report in Codecov by Sentry. |
Co-authored-by: EstΓ©ban <[email protected]>
Do you think you could add an example in |
README.md
Outdated
@@ -225,6 +225,18 @@ Log types are exposed as `consola.[type](...)` and each is a preset of styles an | |||
|
|||
A list of all available built-in types is [available here](./src/constants.ts). | |||
|
|||
## Raw output | |||
|
|||
Objects sent to reporter by logging them could be an issue when using conflicting key (esp. `args`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to add a link to isLogObj
function, or add more description about conflicting keys, because conflicting keys are not so many, just a few.
Or, we could cover it in examples, as #271 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea to add a link to the isLogObj and we could add a note that this is an advanced feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this is what i am saying in comment bellow haha, to not go too deep, non of these internals are supposed to be documented as stable feature to use, nor are guaranteed to stay as is, that's why initially not documented ;)
Thanks for helping document this feature. BTW keep note that it is an advanced feature I introduced back then as an escape hatch. We probably should consider it. |
@pi0 to be honest, by writing the docs I wasn't feeling comfortable with the strange behavior of reporters when we are passing an object containing an args key.. |
I'm not fully confident by doing this documentation as raw method looks like a rescue patch to a potential issue of consola. I'm wondering why consola permits those conflicts by passing |
π Linked issue
Closes #268
β Type of change
π Description
Add a chapter about the raw function to bypass potential bad interpretation from reporter.
π Checklist