fix(logs): call split on strings only

This commit is contained in:
Matteo Pagliazzi 2020-03-09 16:18:57 +01:00
parent effb66a089
commit b9bfb3f722

View file

@ -69,8 +69,10 @@ if (IS_PROD) {
format: winston.format.combine(
// Remove stacktrace from json, printed separately
winston.format(info => {
const message = info.message.split('\n')[0];
info.message = message;
if (info && info.message && typeof info.message.split === 'function') {
const message = info.message.split('\n')[0];
info.message = message;
}
return info;
})(),
winston.format.prettyPrint({