nuxt-logger

logger module for nuxtjs
9,387 4
Install
npm install nuxt-logger
Latest Version:0.2.0
License:MIT
Last Updated:May 13, 2018
Links: GitHub  ·  npm
Maintainer: mahnuh

nuxt-logger

npm npm (scoped with tag) npm (scoped with tag)

A small but helpful logging module for nuxt projects.

Setup

  • Add nuxt-logger to your project using yarn or npm
  • Add nuxt-logger to the modules section of your project's nuxt.config.js
{
  modules: [
   'nuxt-logger',
  ],

  logger: {
   // (optional) custom configuration
  }
}

Custom configuration

logger: {
  isEnabled: true, // true or false, defaults to true
  logLevel: 'debug', // debug, info, warn or error, defaults to debug
}

Usage

There are 4 methods available, one for each log level (debug, info, warn, error) which accept one or more arguments of any kind.

export default {
   methods:{
     foo() {
        this.$log.debug('foo')
        this.$log.info({foo: 'bar'})
        this.$log.warn('warning!')
        this.$log.error('Error', 500)
     }
   }
}

To do

  • Better support for server side rendering
  • Better support for Safari and Firefox (method name missing)

Related Packages

@blokwise/dynamic

Load components initialized through @nuxt/components dyamically.

11,169 57
@nuxt-hero-icons/outline

A set of free MIT-licensed high-quality SVG icons as Vue functional components.

5,626 4
nuxt-seo-meta

nuxtjs seo meta generator

1,378 43
vue-crudengine

Crudengine frontend api plugin for vuejs

1,097 3
@nuxtjs/redirect-module

Nuxt module to dynamically redirect initial requests

248,427 307

Version History

Version Released License
0.2.0 MIT
0.1.2 MIT
0.1.1 MIT
0.1.0 MIT