Logs: Prevent feedback loops by omitting repeated messages #2335

This also prevents debug and trace messages to be sent to the frontend.
This commit is contained in:
Michael Mayer
2022-05-20 11:31:39 +02:00
parent 41e7cc0513
commit 2de1e338bd
5 changed files with 89 additions and 16 deletions

View File

@@ -93,7 +93,11 @@ func wsReader(ws *websocket.Conn, writeMutex *sync.Mutex, connId string, conf *c
func wsWriter(ws *websocket.Conn, writeMutex *sync.Mutex, connId string) {
pingTicker := time.NewTicker(15 * time.Second)
s := event.Subscribe(
"log.*",
"log.fatal",
"log.error",
"log.warning",
"log.warn",
"log.info",
"notify.*",
"index.*",
"upload.*",