From e15e88584e0e2e70e890a7ffcbb0874d6e9958bf Mon Sep 17 00:00:00 2001 From: Tony Li Date: Thu, 18 Jan 2018 13:08:11 -0500 Subject: [PATCH] purge log w/ timestamp --- server/build.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/build.go b/server/build.go index 9a0199729..d97ab98fe 100644 --- a/server/build.go +++ b/server/build.go @@ -693,7 +693,8 @@ func DeleteBuildLogs(c *gin.Context) { } for _, proc := range procs { - buf := bytes.NewBufferString(fmt.Sprintf(deleteStr, proc.Name, user.Login)) + t := time.Now() + buf := bytes.NewBufferString(fmt.Sprintf(deleteStr, proc.Name, user.Login, t.Format(time.RFC3339)) lerr := store.FromContext(c).LogSave(proc, buf) if lerr != nil { err = lerr @@ -711,6 +712,6 @@ var deleteStr = `[ { "proc": %q, "pos": 0, - "out": "logs purged by %s\n" + "out": "logs purged by %s on %s\n" } ]`