diff options
Diffstat (limited to 'models/action.go')
-rw-r--r-- | models/action.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/models/action.go b/models/action.go index d4cc4086db..e496166c42 100644 --- a/models/action.go +++ b/models/action.go @@ -110,7 +110,7 @@ func (a *Action) loadActUser() { } else if IsErrUserNotExist(err) { a.ActUser = NewGhostUser() } else { - log.Error(4, "GetUserByID(%d): %v", a.ActUserID, err) + log.Error("GetUserByID(%d): %v", a.ActUserID, err) } } @@ -121,7 +121,7 @@ func (a *Action) loadRepo() { var err error a.Repo, err = GetRepositoryByID(a.RepoID) if err != nil { - log.Error(4, "GetRepositoryByID(%d): %v", a.RepoID, err) + log.Error("GetRepositoryByID(%d): %v", a.RepoID, err) } } @@ -256,7 +256,7 @@ func (a *Action) GetIssueTitle() string { index := com.StrTo(a.GetIssueInfos()[0]).MustInt64() issue, err := GetIssueByIndex(a.RepoID, index) if err != nil { - log.Error(4, "GetIssueByIndex: %v", err) + log.Error("GetIssueByIndex: %v", err) return "500 when get issue" } return issue.Title @@ -268,7 +268,7 @@ func (a *Action) GetIssueContent() string { index := com.StrTo(a.GetIssueInfos()[0]).MustInt64() issue, err := GetIssueByIndex(a.RepoID, index) if err != nil { - log.Error(4, "GetIssueByIndex: %v", err) + log.Error("GetIssueByIndex: %v", err) return "500 when get issue" } return issue.Content @@ -419,7 +419,7 @@ func (pc *PushCommits) AvatarLink(email string) string { if err != nil { pc.avatars[email] = base.AvatarLink(email) if !IsErrUserNotExist(err) { - log.Error(4, "GetUserByEmail: %v", err) + log.Error("GetUserByEmail: %v", err) return "" } } else { @@ -619,7 +619,7 @@ func CommitRepoAction(opts CommitRepoActionOptions) error { } if err = UpdateIssuesCommit(pusher, repo, opts.Commits.Commits, refName); err != nil { - log.Error(4, "updateIssuesCommit: %v", err) + log.Error("updateIssuesCommit: %v", err) } } @@ -661,12 +661,12 @@ func CommitRepoAction(opts CommitRepoActionOptions) error { if isNewBranch { gitRepo, err := git.OpenRepository(repo.RepoPath()) if err != nil { - log.Error(4, "OpenRepository[%s]: %v", repo.RepoPath(), err) + log.Error("OpenRepository[%s]: %v", repo.RepoPath(), err) } shaSum, err = gitRepo.GetBranchCommitID(refName) if err != nil { - log.Error(4, "GetBranchCommitID[%s]: %v", opts.RefFullName, err) + log.Error("GetBranchCommitID[%s]: %v", opts.RefFullName, err) } if err = PrepareWebhooks(repo, HookEventCreate, &api.CreatePayload{ Ref: refName, @@ -697,11 +697,11 @@ func CommitRepoAction(opts CommitRepoActionOptions) error { gitRepo, err := git.OpenRepository(repo.RepoPath()) if err != nil { - log.Error(4, "OpenRepository[%s]: %v", repo.RepoPath(), err) + log.Error("OpenRepository[%s]: %v", repo.RepoPath(), err) } shaSum, err = gitRepo.GetTagCommitID(refName) if err != nil { - log.Error(4, "GetTagCommitID[%s]: %v", opts.RefFullName, err) + log.Error("GetTagCommitID[%s]: %v", opts.RefFullName, err) } if err = PrepareWebhooks(repo, HookEventCreate, &api.CreatePayload{ Ref: refName, |