Fix error not logged
Fixes #46 (closed)
Pino seems to log the error with the callstack when the error is passed as the first argument.
Create a js file at the root of the project to test that:
const {logger} = require('./dist/server/helpers/logger')
logger.error({error: new Error('test')}, 'does not work')
logger.error('does not work either', {err: new Error('test')})
logger.error({err: new Error('test')}, 'works!')
logger.error(new Error('test'), 'works as well!')
Edited by Florent