1
0

Instantiate a logDelete in main.

This commit is contained in:
Alexander Andreev 2022-07-01 03:32:12 +04:00
parent 43a2f6b9d5
commit 2cf7e80480
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -60,6 +60,12 @@ func main() {
} }
defer logDownload.Close() defer logDownload.Close()
logDelete, err := logging.NewLogger(config.Log.Delete, config.Log.ToStdout)
if err != nil {
log.Fatalln("delete logger:", err)
}
defer logDelete.Close()
watcha, err := watcher.NewInotifyWatcher() watcha, err := watcher.NewInotifyWatcher()
if err != nil { if err != nil {
logErr.Fatalln(err) logErr.Fatalln(err)
@ -78,7 +84,7 @@ func main() {
watcha.WatchForMask(uploadDirNotify, watcher.CrDelMask) watcha.WatchForMask(uploadDirNotify, watcher.CrDelMask)
hand := handlers.NewUploadHandlers(config, logErr, logUpload, logDownload, &uploadDirSize) hand := handlers.NewUploadHandlers(config, logErr, logUpload, logDownload, logDelete, &uploadDirSize)
srv := server.NewHttpServer() srv := server.NewHttpServer()
srv.SetNotFoundHandler(hand.NotFound) srv.SetNotFoundHandler(hand.NotFound)