aboutsummaryrefslogtreecommitdiff
path: root/internal/process
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-02-20 02:25:02 +0800
committerGitHub <noreply@github.com>2020-02-20 02:25:02 +0800
commit1c09373b4f7dbc68154c817b4ee44bfa3b3f637c (patch)
treeaeec9a80d10f9ef28f0d0b128f8a84bf3cb5bdb1 /internal/process
parent422a20648466f270de195dce3bca04e977bacd13 (diff)
log: migrate to unknwon.dev/clog/v2 (#5927)
* Add unknwon.dev/clog/v2 * Update all places
Diffstat (limited to 'internal/process')
-rw-r--r--internal/process/manager.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/process/manager.go b/internal/process/manager.go
index babfceed..274e63df 100644
--- a/internal/process/manager.go
+++ b/internal/process/manager.go
@@ -12,11 +12,11 @@ import (
"sync"
"time"
- log "gopkg.in/clog.v1"
+ log "unknwon.dev/clog/v2"
)
var (
- ErrExecTimeout = errors.New("Process execution timeout")
+ ErrExecTimeout = errors.New("process execution timeout")
)
const DEFAULT_TIMEOUT = 60 * time.Second
@@ -101,7 +101,7 @@ func ExecDir(timeout time.Duration, dir, desc, cmdName string, args ...string) (
select {
case <-time.After(timeout):
if errKill := Kill(pid); errKill != nil {
- log.Error(2, "Fail to kill timeout process [pid: %d, desc: %s]: %v", pid, desc, errKill)
+ log.Error("Failed to kill timeout process [pid: %d, desc: %s]: %v", pid, desc, errKill)
}
<-done
return "", ErrExecTimeout.Error(), ErrExecTimeout