Features
- Memory usage
- File path
- Colorized
- Time execution
- Very light 3kb
Installation
npm i @jodacame/vue-logger
Nuxt Usage
Create file into plugins folder plugins/logger.js and put the next code:
import Vue from 'vue'
import logger from '@jodacame/vue-logger'
Vue.prototype.$log = logger
Edit your nuxt.config.js file and load the plugin like this:
plugins: [
{ src: '~/plugins/logger' }
]
Usage
Only available in client mode
// Debug
this.$log.debug(`Hi I'am a Debug`)
// Error
this.$log.error(`Hi I'am a Error`)
// Warning
this.$log.warning(`Hi I'am a Warning`)
// Info
this.$log.info(`Hi I'am a Info`)
// Success
this.$log.success(`Hi I'am a Success`)