Browse Source

Fix string format verbs (#3637)

Alexander Lunegov 3 years ago
parent
commit
d5d21b67d2
5 changed files with 6 additions and 6 deletions
  1. 1 1
      models/pull.go
  2. 2 2
      models/repo_mirror.go
  3. 1 1
      models/update.go
  4. 1 1
      models/webhook.go
  5. 1 1
      routers/admin/auths.go

+ 1 - 1
models/pull.go

@@ -929,7 +929,7 @@ func TestPullRequests() {
929 929
 
930 930
 		pr, err := GetPullRequestByID(com.StrTo(prID).MustInt64())
931 931
 		if err != nil {
932
-			log.Error(4, "GetPullRequestByID[%d]: %v", prID, err)
932
+			log.Error(4, "GetPullRequestByID[%s]: %v", prID, err)
933 933
 			continue
934 934
 		} else if err = pr.testPatch(); err != nil {
935 935
 			log.Error(4, "testPatch[%d]: %v", pr.ID, err)

+ 2 - 2
models/repo_mirror.go

@@ -231,7 +231,7 @@ func SyncMirrors() {
231 231
 
232 232
 		m, err := GetMirrorByRepoID(com.StrTo(repoID).MustInt64())
233 233
 		if err != nil {
234
-			log.Error(4, "GetMirrorByRepoID [%d]: %v", repoID, err)
234
+			log.Error(4, "GetMirrorByRepoID [%s]: %v", repoID, err)
235 235
 			continue
236 236
 		}
237 237
 
@@ -241,7 +241,7 @@ func SyncMirrors() {
241 241
 
242 242
 		m.ScheduleNextUpdate()
243 243
 		if err = UpdateMirror(m); err != nil {
244
-			log.Error(4, "UpdateMirror [%d]: %v", repoID, err)
244
+			log.Error(4, "UpdateMirror [%s]: %v", repoID, err)
245 245
 			continue
246 246
 		}
247 247
 	}

+ 1 - 1
models/update.go

@@ -106,7 +106,7 @@ func PushUpdate(opts PushUpdateOptions) (err error) {
106 106
 	}
107 107
 
108 108
 	if isDelRef {
109
-		log.GitLogger.Info("Reference '%s' has been deleted from '%s/%s' by %d",
109
+		log.GitLogger.Info("Reference '%s' has been deleted from '%s/%s' by %s",
110 110
 			opts.RefFullName, opts.RepoUserName, opts.RepoName, opts.PusherName)
111 111
 		return nil
112 112
 	}

+ 1 - 1
models/webhook.go

@@ -634,7 +634,7 @@ func DeliverHooks() {
634 634
 
635 635
 		tasks = make([]*HookTask, 0, 5)
636 636
 		if err := x.Where("repo_id=? AND is_delivered=?", repoID, false).Find(&tasks); err != nil {
637
-			log.Error(4, "Get repository [%d] hook tasks: %v", repoID, err)
637
+			log.Error(4, "Get repository [%s] hook tasks: %v", repoID, err)
638 638
 			continue
639 639
 		}
640 640
 		for _, t := range tasks {

+ 1 - 1
routers/admin/auths.go

@@ -233,7 +233,7 @@ func EditAuthSourcePost(ctx *context.Context, form auth.AuthenticationForm) {
233 233
 		ctx.Handle(500, "UpdateSource", err)
234 234
 		return
235 235
 	}
236
-	log.Trace("Authentication changed by admin(%s): %s", ctx.User.Name, source.ID)
236
+	log.Trace("Authentication changed by admin(%s): %d", ctx.User.Name, source.ID)
237 237
 
238 238
 	ctx.Flash.Success(ctx.Tr("admin.auths.update_success"))
239 239
 	ctx.Redirect(setting.AppSubURL + "/admin/auths/" + com.ToStr(form.ID))