Add event hook for sending logs to frontend

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer
2019-12-02 00:30:58 +01:00
parent 063be1650e
commit a2963e9fc6
15 changed files with 128 additions and 54 deletions

View File

@@ -30,7 +30,7 @@ func wsReader(ws *websocket.Conn) {
func wsWriter(ws *websocket.Conn, conf *config.Config) {
pingTicker := time.NewTicker(10 * time.Second)
s := event.Subscribe("notify.*", "index.*", "upload.*", "import.*", "config.*")
s := event.Subscribe("log.*", "notify.*", "index.*", "upload.*", "import.*", "config.*")
defer func() {
pingTicker.Stop()