do not log system logs events.

This commit is contained in:
Miroslav Šedivý 2021-09-09 23:48:05 +02:00
parent f067fe9d62
commit 3e05542205
2 changed files with 3 additions and 2 deletions

View File

@ -33,7 +33,7 @@ export class NekoLogger extends Logger {
if (!this._ws.connected || !this._interval) {
return
}
if (this._logs.length > 0) {
this._ws.send(EVENT.SYSTEM_LOGS, this._logs)
}

View File

@ -1,4 +1,5 @@
import EventEmitter from 'eventemitter3'
import { SYSTEM_LOGS } from '../types/events'
import { Logger } from '../utils/logger'
export interface NekoWebSocketEvents {
@ -71,7 +72,7 @@ export class NekoWebSocket extends EventEmitter<NekoWebSocketEvents> {
return
}
this._log.debug(`sending websocket event`, { event, payload })
if (event != SYSTEM_LOGS) this._log.debug(`sending websocket event`, { event, payload })
this._ws!.send(JSON.stringify({ event, payload }))
}