vuelogr
v1.0.2
Published
Colored and namespaced logging for Vue2
Downloads
41
Readme
vuelogr
Simple but functional logging for Vue Components.
Install
npm install --save vuelogr
yarn add vuelogr
Usage
Setup
Initialize the plugin where you initialize any other plugins in use with Vue. My recommended method is:
Vue.use(require('vuelogr'));
This plugin uses your NODE_ENV and will only log when it is not equal to production.
Components
To get full use of the plugin you must give you components a name property. I recommend placing this property at the top of the component.
export default {
name: 'MyComponent'
...
}
And to use simply call the $log method on the instance.
this.$log('This is important info I want to know.');