Skip to content

Commit

Permalink
feat: updated logging to use consola (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
btkostner authored and Diederik van den Burger committed Jul 12, 2018
1 parent 9f47f6a commit f6abcc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/sentry.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const Raven = require('raven')
const path = require('path')

const logger = require('consola').withScope('nuxt:sentry')

module.exports = function sentry (moduleOptions) {
// Merge options
const options = Object.assign({
Expand All @@ -20,9 +22,7 @@ module.exports = function sentry (moduleOptions) {

// Don't proceed if no keys are provided
if (!options.dsn && !options.public_key && !options.private_key) {
/* eslint-disable no-console */
console.info('nuxt:sentry disabled because no (private) key was found')
/* eslint-enable no-console */
logger.info('Disabled because no (private) key was found')
return
}

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
]
},
"dependencies": {
"consola": "^1.4.1",
"raven": "^2.3.0",
"raven-js": "^3.21.0"
},
Expand Down

0 comments on commit f6abcc8

Please sign in to comment.