Comments (12)
unfortunately workarounds dont work for us as they don't generate valid JSON (at least Datadog doesnt see it as such).
The only thing that seems to work is restoreAll() ...
from consola.
can I over-write the built in reporters of nuxt core with a setting in the nuxt.config.js ?
from consola.
@gkatsanos You can set consola reporters in body of nuxt.config
file. (nuxt/nuxt#8507 (comment))
Also respectfully, please use channels like nuxt discord to get help for your solutions such as datadog integration. I would also be more than happy if can help there. Sending random questions in several repo/issues is wasting time.
from consola.
Issue fixed in v2.15.1
@gkatsanos You can get update with yarn upgrade nuxt
(or better recreating lock file)
from consola.
@pi0 I think I need to wait until its propagated to the main repo, right? https://github.com/nuxt/nuxt.js/releases
from consola.
@gkatsanos nop npm magic! (nuxt has range dependency on consola like ^2.15.0
) when lock file is created, it will fetch latest possible in range :)
from consola.
@pi0 would you be available on the Vue Discord ? ( console.error ( { .. } ) still generates invalid JSON)
from consola.
@gkatsanos Sure pi0#6582
from consola.
console.error when wrapped still adds ERROR in front of the object returned. reproduction: https://repl.it/@gkatsans/Consola-2#index.js
I guess this may be intended, in which case what would be the workaround? (also messaged you in Discord)
from consola.
It is intended indeed. Fancy reporter adds the badge. So you should either opt-out in nuxt or replace reporters
from consola.
Thanks. I can add a parser in Datadog that handles it but I guess going with the previous suggestion of
consola.setReporters([
{
log: (e) => {
process.stdout.write(JSON.stringify(e))
},
},
])
in nuxt.config.js seems a more safe solution as I could also do further manipulation there centrally.. What do you think? (add a timestamp, structure the response etc)
from consola.
nuxt.config is safest place indeed (also please note consola should not be modified in other places. only use console.* calls)
from consola.
Related Issues (20)
- docs: add explanation about `LogObject` and `raw` method HOT 7
- Option to show log location
- `initial` prop doesn't seem to work HOT 3
- Formatting not working when using Nuxt HOT 5
- No console output at all HOT 4
- How to use badge for every level with FancyReporter ?
- Enhance `consola.prompt` Select Options to Support Generic Values Matching Clack's Flexibility
- Spinner not spining HOT 4
- Password prompt HOT 1
- add additional transports or export reporters HOT 3
- log with the filename and line number
- infinite loop protection HOT 2
- 🎨 Allow configuring consola to auto colorize the according to type HOT 1
- 'box()' function does not work with a title >=2 chars longer than the content length
- Expose PromptOptions as a public API HOT 1
- Module not found in typescript react app HOT 1
- A way to allow fancy in test HOT 1
- Consola logs do not appear in VSCode Debugger HOT 1
- Verbose method is always ignored
- Easiest way to process.exit on with `consola.fatal`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from consola.