Giter Club home page Giter Club logo

Comments (12)

gkatsanos avatar gkatsanos commented on August 25, 2024

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.

gkatsanos avatar gkatsanos commented on August 25, 2024

can I over-write the built in reporters of nuxt core with a setting in the nuxt.config.js ?

from consola.

pi0 avatar pi0 commented on August 25, 2024

@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.

pi0 avatar pi0 commented on August 25, 2024

Issue fixed in v2.15.1

@gkatsanos You can get update with yarn upgrade nuxt (or better recreating lock file)

from consola.

gkatsanos avatar gkatsanos commented on August 25, 2024

@pi0 I think I need to wait until its propagated to the main repo, right? https://github.com/nuxt/nuxt.js/releases

from consola.

pi0 avatar pi0 commented on August 25, 2024

@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.

gkatsanos avatar gkatsanos commented on August 25, 2024

@pi0 would you be available on the Vue Discord ? ( console.error ( { .. } ) still generates invalid JSON)

from consola.

pi0 avatar pi0 commented on August 25, 2024

@gkatsanos Sure pi0#6582

from consola.

gkatsanos avatar gkatsanos commented on August 25, 2024

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.

pi0 avatar pi0 commented on August 25, 2024

It is intended indeed. Fancy reporter adds the badge. So you should either opt-out in nuxt or replace reporters

from consola.

gkatsanos avatar gkatsanos commented on August 25, 2024

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.

pi0 avatar pi0 commented on August 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.