Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nuxt-log

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-log

> A logger module for Nuxt.js using [vuejs-logger](https://github.com/justinkames/vuejs-logger)

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

nuxt-log

A logger module for Nuxt.js using vuejs-logger

Setup

  • Add nuxt-log dependency using yarn or npm to your project
  • Add nuxt-log to modules section of nuxt.config.js
const logOptions = {
  // optional : defaults to true if not specified
  isEnabled: true,
  // required ['debug', 'info', 'warn', 'error', 'fatal']
  logLevel : 'debug',
  // optional : defaults to false if not specified
  stringifyArguments : false,
  // optional : defaults to false if not specified
  showLogLevel : false,
  // optional : defaults to false if not specified
  showMethodName : false,
  // optional : defaults to '|' if not specified
  separator: '|',
  // optional : defaults to false if not specified
  showConsoleColors: false
}

{
  modules: [
   ['nuxt-log', logOptions],
  ]
}

Usage

You can use $log in almost any context using app.$log or this.$log.

See vuejs-logger official docs for more usage information.

export default {
  data() {
    return {
      a: 'a',
      b: 'b',
    };
  },
  created() {
    this.$log.debug('test', this.a, 123);
    this.$log.info('test', this.b);
    this.$log.warn('test');
    this.$log.error('test');
    this.$log.fatal('test');
  },
};

License

MIT License

Copyright (c) webcore-it

Keywords

FAQs

Package last updated on 12 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc