summaryrefslogtreecommitdiff
path: root/src/rhimportd/ctrlWatchDir.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-07-24 01:08:23 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-07-24 01:08:23 (GMT)
commitb94feddead6ebb906b17a797477f2d0ff989832e (patch)
tree7da558d83bbc64b3f27a4b8b4caefc4aff2d0bd8 /src/rhimportd/ctrlWatchDir.go
parent38cde493d2a9a1961e057fe0e175b437b3916148 (diff)
client/session specific log prefixes
Diffstat (limited to 'src/rhimportd/ctrlWatchDir.go')
-rw-r--r--src/rhimportd/ctrlWatchDir.go9
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