mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-20 08:50:21 +00:00
Cleanup log messaging
This change corrects a few logging issues: * Standardized formatting errors with '%v'. * Standardized failure warning word usage. * Corrected an instance of using the standard log library when the gitea log library should be used instead.
This commit is contained in:
parent
73d05a51e3
commit
bf6f61cc69
26 changed files with 111 additions and 112 deletions
|
@ -56,7 +56,7 @@ func setup(logPath string) {
|
|||
if setting.UseSQLite3 || setting.UseTiDB {
|
||||
workDir, _ := setting.WorkDir()
|
||||
if err := os.Chdir(workDir); err != nil {
|
||||
log.GitLogger.Fatal(4, "Fail to change directory %s: %v", workDir, err)
|
||||
log.GitLogger.Fatal(4, "Failed to change directory %s: %v", workDir, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,10 +134,10 @@ func handleUpdateTask(uuid string, user, repoUser *models.User, reponame string,
|
|||
if err == nil {
|
||||
resp.Body.Close()
|
||||
if resp.StatusCode/100 != 2 {
|
||||
log.GitLogger.Error(2, "Fail to trigger task: not 2xx response code")
|
||||
log.GitLogger.Error(2, "Failed to trigger task: not 2xx response code")
|
||||
}
|
||||
} else {
|
||||
log.GitLogger.Error(2, "Fail to trigger task: %v", err)
|
||||
log.GitLogger.Error(2, "Failed to trigger task: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ func runServ(c *cli.Context) error {
|
|||
|
||||
mode, err := models.AccessLevel(user, repo)
|
||||
if err != nil {
|
||||
fail("Internal error", "Fail to check access: %v", err)
|
||||
fail("Internal error", "Failed to check access: %v", err)
|
||||
} else if mode < requestedMode {
|
||||
clientMessage := accessDenied
|
||||
if mode >= models.AccessModeRead {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue