f5a8c5a45d
Signed-off-by: Michael Mayer <michael@photoprism.app>
29 lines
560 B
Go
29 lines
560 B
Go
package event
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
"github.com/photoprism/photoprism/pkg/dummy"
|
|
)
|
|
|
|
// init initializes the event package.
|
|
func init() {
|
|
// Event hooks for the default logger.
|
|
hooks := logrus.LevelHooks{}
|
|
hooks.Add(NewHook(SharedHub()))
|
|
|
|
// Log is the global default logger.
|
|
Log = &logrus.Logger{
|
|
Out: os.Stderr,
|
|
Formatter: TextFormatter,
|
|
Hooks: hooks,
|
|
Level: logrus.DebugLevel,
|
|
ExitFunc: os.Exit,
|
|
ReportCaller: false,
|
|
}
|
|
|
|
// Create dummy audit logger.
|
|
AuditLog = dummy.NewLogger()
|
|
}
|