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

@@ -11,16 +11,12 @@ import (
"os"
"syscall"
"github.com/photoprism/photoprism/internal/event"
"github.com/photoprism/photoprism/internal/util"
"github.com/sevlyar/go-daemon"
"github.com/sirupsen/logrus"
)
var log *logrus.Logger
func init() {
log = logrus.StandardLogger()
}
var log = event.Log
func childAlreadyRunning(filePath string) (pid int, running bool) {
if !util.Exists(filePath) {