mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-22 18:01:02 +00:00
Merge pull request #2309 from tonglil/patch-1
Log timestamp when puring log
This commit is contained in:
commit
75150d4a42
1 changed files with 3 additions and 2 deletions
|
@ -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().UTC()
|
||||
buf := bytes.NewBufferString(fmt.Sprintf(deleteStr, proc.Name, user.Login, t.Format(time.UnixDate)))
|
||||
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"
|
||||
}
|
||||
]`
|
||||
|
|
Loading…
Reference in a new issue