Skip to content

noudadrichem/vue-bunyan-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Bunyan logger for VueJS

This is just a vue plugin, core comes from bunyan & browser bunyan

Install:

npm install vue-bunyan-logger@latest

How to use

var Vue = require('vue')
var logger = require('vue-bunyan-logger')

Vue.use(logger, { name: 'my-logger' }) // bind the plugin and include the logger name
import Vue from 'vue'
import logger from 'vue-bunyan-logger'

Vue.use(logger)

Current logging options

this.$log.info('this logs an info message')

this.$log.warn('this logs a warning message')

this.$log.fatal('this logs a fatal message')

this.$log.error('this logs an error message')

this.$log.error({ obj: {
  message: 'this logs an object.'
}})

Todo

  • options to pass to bunyan.

About

🌈 A vue plugin that extends 'browser-bunyan'. Pretty logs in your browser console.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published