diff options
Diffstat (limited to 'src/rhimportd/ctrlWatchDir.go')
-rw-r--r-- | src/rhimportd/ctrlWatchDir.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/rhimportd/ctrlWatchDir.go b/src/rhimportd/ctrlWatchDir.go index 0fd389d..91b7621 100644 --- a/src/rhimportd/ctrlWatchDir.go +++ b/src/rhimportd/ctrlWatchDir.go @@ -110,7 +110,9 @@ func watchDirParseRequest(conf *rhimport.Config, db *rddb.DBChan, req *os.File) return } - ctx = rhimport.NewContext(conf, db, rhl, rhdl) + logname := "watch-" + filepath.Base(req.Name()) + logname = strings.TrimSuffix(logname, filepath.Ext(logname)) + ctx = rhimport.NewContext(conf, db, getStdLog(logname+"-std"), getDbgLog(logname+"-dbg")) ctx.UserName = reqdata.UserName ctx.Trusted = true ctx.ShowId = reqdata.ShowId @@ -162,11 +164,6 @@ func watchDirHandler(conf *rhimport.Config, db *rddb.DBChan, ctx *rhimport.Conte watchDirErrorResponse(filename, http.StatusInternalServerError, err.Error(), res.SourceFile) return } - if res.ResponseCode == http.StatusOK { - rhl.Println("ImportFile succesfully imported", ctx.SourceFile) - } else { - rhl.Println("ImportFile import of", ctx.SourceFile, "was unsuccesful") - } watchDirResponse(filename, res) return |