mirror of
https://github.com/node-red/node-red.git
synced 2025-12-27 15:34:26 +01:00
Add guard against unknown level
This commit is contained in:
@@ -99,7 +99,7 @@ const utilLog = function (msg, level) {
|
||||
d.getMinutes().toString().padStart(2, '0'),
|
||||
d.getSeconds().toString().padStart(2, '0')
|
||||
].join(':');
|
||||
console.log(chalk[levelColours[level]](`${d.getDate()} ${months[d.getMonth()]} ${time} - ${msg}`))
|
||||
console.log(chalk[levelColours[level] || 'white'](`${d.getDate()} ${months[d.getMonth()]} ${time} - ${msg}`))
|
||||
}
|
||||
|
||||
var consoleLogger = function(msg) {
|
||||
|
||||
Reference in New Issue
Block a user