diff --git a/commands/context.go b/commands/context.go index e306821e8..e43672eee 100644 --- a/commands/context.go +++ b/commands/context.go @@ -117,7 +117,6 @@ func (c *Context) LogRequest(req *cmds.Request) func() { Command: strings.Join(req.Path, "/"), Options: req.Options, Args: req.Arguments, - ID: c.ReqLog.nextID, log: c.ReqLog, } c.ReqLog.AddEntry(rle) diff --git a/commands/reqlog.go b/commands/reqlog.go index 55488ab3e..cd52d75bf 100644 --- a/commands/reqlog.go +++ b/commands/reqlog.go @@ -38,6 +38,7 @@ func (rl *ReqLog) AddEntry(rle *ReqLogEntry) { rl.lock.Lock() defer rl.lock.Unlock() + rle.ID = rl.nextID rl.nextID++ rl.Requests = append(rl.Requests, rle)