logmessages: all log strings in one file

EXCEPT: migrations.go, log strings there aren't gonna be repeated
anywhere else, are very specific, and will probably change a lot.
This commit is contained in:
Harvey Tindall
2024-08-01 20:17:05 +01:00
parent 15a317f84f
commit 711394232b
25 changed files with 410 additions and 1740 deletions

View File

@@ -91,7 +91,7 @@ func (app *appContext) NewUserAdmin(gc *gin.Context) {
errors, code, err := app.ombi.NewUser(req.Username, req.Password, req.Email, profile.Ombi)
if err != nil || code != 200 {
app.err.Printf(lm.FailedCreateUser, lm.Ombi, req.Username, err)
app.debug.Printf(lm.AdditionalOmbiErrors, strings.Join(errors, ", "))
app.debug.Printf(lm.AdditionalErrors, lm.Ombi, strings.Join(errors, ", "))
} else {
app.info.Printf(lm.CreateUser, lm.Ombi, req.Username)
}
@@ -465,7 +465,7 @@ func (app *appContext) newUser(req newUserDTO, confirmed bool, gc *gin.Context)
}
} else {
app.info.Printf(lm.FailedCreateUser, lm.Ombi, req.Username, err)
app.debug.Printf(lm.AdditionalOmbiErrors, strings.Join(errors, ", "))
app.debug.Printf(lm.AdditionalErrors, lm.Ombi, strings.Join(errors, ", "))
}
} else {
ombiUser, status, err = app.getOmbiUser(id)
@@ -490,7 +490,7 @@ func (app *appContext) newUser(req newUserDTO, confirmed bool, gc *gin.Context)
resp, status, err := app.ombi.SetNotificationPrefs(ombiUser, dID, tUser)
if !(status == 200 || status == 204) || err != nil {
app.err.Printf(lm.FailedSyncContactMethods, lm.Ombi, err)
app.debug.Printf(lm.AdditionalOmbiErrors, resp)
app.debug.Printf(lm.AdditionalErrors, lm.Ombi, resp)
}
}
}