Verified Commit fc2ea9c8 authored by les's avatar les
Browse files

minor on logs

parent 6dc9f7d2
......@@ -21,10 +21,11 @@ async function main () {
} else {
await nuxt.ready()
}
try {
await nuxt.listen()
} catch (e) {
log.error(e)
log.error({ message: e.message })
return
}
......
......@@ -3,7 +3,7 @@ const DailyRotateFile = require('winston-daily-rotate-file')
const dayjs = require('dayjs')
const config = require('config')
const gancioFormat = format.printf(({ timestamp, level, message }) => {
const gancioFormat = format.printf(({ timestamp, level, message, error }) => {
return `${dayjs(timestamp).format('DD MMM YYYY HH:mm:ss')} ${level}: ${message}`
})
......@@ -15,7 +15,7 @@ const logger = createLogger({
handleExceptions: true,
handleRejections: true,
level: 'debug',
format: format.combine(format.timestamp(), format.splat(), format.colorize(), gancioFormat)
format: format.combine(format.errors({ stack: true }), format.timestamp(), format.colorize(), format.splat(), gancioFormat)
}
)]
: [new DailyRotateFile({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment