From f6abcc830c1690203479460feadba52b2ef6dee7 Mon Sep 17 00:00:00 2001 From: Blake Kostner Date: Thu, 12 Jul 2018 00:45:30 -0700 Subject: [PATCH] feat: updated logging to use consola (#25) --- lib/sentry.js | 6 +++--- package.json | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/sentry.js b/lib/sentry.js index 88898d95..0be3cd8b 100644 --- a/lib/sentry.js +++ b/lib/sentry.js @@ -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({ @@ -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 } diff --git a/package.json b/package.json index b80707e6..c08b5159 100755 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ ] }, "dependencies": { + "consola": "^1.4.1", "raven": "^2.3.0", "raven-js": "^3.21.0" },