+const excludedKeys = {
+ level: true,
+ message: true,
+ splat: true,
+ timestamp: true,
+ label: true
+}
+function keysExcluder (key, value) {
+ return excludedKeys[key] === true ? undefined : value
+}
+
+const loggerFormat = winston.format.printf((info) => {
+ let additionalInfos = JSON.stringify(info, keysExcluder, 2)
+ if (additionalInfos === '{}') additionalInfos = ''
+ else additionalInfos = ' ' + additionalInfos
+
+ return `[${info.label}] ${new Date(info.timestamp).toISOString()} ${info.level}: ${info.message}${additionalInfos}`
+})
+