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 explanation about LogObject
and raw
method
#268
Comments
Would you provide a minimal reproduction, so that everyone can see what's happening actually? |
I'd be happy to if I knew a site where I could specify packages. Could you suggest one? |
Stackblitz or CodeSandbox are commonly used by many OSS projects. |
Ok, I added a stackblitz link to the OP. |
Sorry to reply late. I was sick. It doesn't seem to be well documented, Consola's logging methods have a signature for which an object of Consola determines whether This is why your code logger.info(test.count('a', 'b')) shows Fortunately, Consola provides a bypass. So, the code below will show what you want (I tested in my local). logger.info.raw(test.count('a', 'b')) By the way, would you keep this issue open so that we can handle documentation issue later? |
LogObject
and raw
method
Got it. Thank you. Yes, I will keep it open. |
What would be nice is if when creating my 'logger' instance: 'const logger = consola.withTag('x')' there would be another method which would cause the default usage to use 'raw' on everything. For example: |
Environment
consola v3.2.3
nodeJS v 19.4.0
Reproduction
https://stackblitz.com/edit/stackblitz-starters-9gyjzk?file=index.js
Describe the bug
I'm getting different results from consola vs console - consola isn't correct.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: