diff --git a/pages/api/error-pino-logflare.js b/pages/api/error-pino-logflare.js index 7316cd0..78fb995 100644 --- a/pages/api/error-pino-logflare.js +++ b/pages/api/error-pino-logflare.js @@ -2,13 +2,11 @@ import logger from '../../logger/logger' export default function handler(req, res) { - // Lets log an error with console here. + // Lets log an error with pino-logflare here. try { - throw new Error('Whoops!') + throw new Error('Whoops! Error with pino-logflare.') } catch (e) { - const onlyPino = require('pino')() - - onlyPino.error(e) + logger.error(e) } res.status(200).json({ error: 'true' }) diff --git a/pages/api/error-pino.js b/pages/api/error-pino.js index 7316cd0..1973358 100644 --- a/pages/api/error-pino.js +++ b/pages/api/error-pino.js @@ -2,9 +2,9 @@ import logger from '../../logger/logger' export default function handler(req, res) { - // Lets log an error with console here. + // Lets log an error with pino here. try { - throw new Error('Whoops!') + throw new Error('Whoops! Error with pino.') } catch (e) { const onlyPino = require('pino')()