mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-24 08:02:18 +02:00
purge log w/ timestamp
This commit is contained in:
parent
8771fb53af
commit
e15e88584e
@ -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"
|
||||
}
|
||||
]`
|
||||
|
Loading…
Reference in New Issue
Block a user