diff --git a/cmd/warehost-web/handler.go b/cmd/warehost-web/handler.go index c1ffdc5..72885af 100644 --- a/cmd/warehost-web/handler.go +++ b/cmd/warehost-web/handler.go @@ -28,13 +28,14 @@ func handlerstatic(w http.ResponseWriter, r *http.Request) { logger := liblog.NewModulLog(r.Host).GetLog(r, r.URL.Path) website, err := getWebsite(r.Host) if err != nil { + logger.Warn("website not found: ", r.Host) http.NotFound(w, r) return } path := fmt.Sprintf("%s/%d/%s/%s", config.Webroot, website.ID, "static", r.URL.Path) if f, err := os.Stat(path); err == nil && !f.IsDir() { - logger.Warn("website not found: ", r.Host) + logger.Info("done") http.ServeFile(w, r, path) return } @@ -52,6 +53,7 @@ func handlerfiles(w http.ResponseWriter, r *http.Request) { path := fmt.Sprintf("%s/%d/%s/%s", config.Webroot, website.ID, "files", r.URL.Path) if f, err := os.Stat(path); err == nil && !f.IsDir() { + logger.Info("done") http.ServeFile(w, r, path) return }