Disregard socketListener.level if level >= FATAL

This commit is contained in:
mikiher 2024-09-11 22:05:38 +03:00
parent 220f7ef7cd
commit 03ff5d8ae1

View File

@ -86,7 +86,7 @@ class Logger {
// Emit log to sockets that are listening to log events
this.socketListeners.forEach((socketListener) => {
if (socketListener.level <= level) {
if (level >= LogLevel.FATAL || level >= socketListener.level) {
socketListener.socket.emit('log', logObj)
}
})