js-logger | Lightweight , unobtrusive , configurable JavaScript logger
kandi X-RAY | js-logger Summary
kandi X-RAY | js-logger Summary
Lightweight, unobtrusive, configurable JavaScript logger.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of js-logger
js-logger Key Features
js-logger Examples and Code Snippets
Community Discussions
Trending Discussions on js-logger
QUESTION
I want to have console logging while I'm developing in VueJS but want it disabled for production.
There is a module vuejs-logger
that works fine inside of a Vue component and will be disabled in production mode. But it will not work (for instance) in my service files or library files (outside of Vue instance), nor in Vuex.
Does anyone have any other suggestions? Vuejs integrated or otherwise?
Stay safe, TIA
Edit: Just to clarify, vuejs-logger Typescript integration is the real problem. It throws up so many TS errors that I cannot use it. The actual JS logging seems to work... I'm still interested in other solutions that may work smoothly.
...ANSWER
Answered 2020-Mar-11 at 12:02Consider building your own simple wrapper which will work everywhere, assuming you are using Webpack, like following:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install js-logger
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page