Instantiate a logDelete in main.
This commit is contained in:
parent
43a2f6b9d5
commit
2cf7e80480
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user