From b481927d5e89eacec1892af7611997b56bed9883 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 17 Feb 2017 18:23:35 -0500 Subject: [PATCH] Improve error handling --- models/user.go | 2 +- modules/context/context.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/user.go b/models/user.go index 91aff928f..f6697e386 100644 --- a/models/user.go +++ b/models/user.go @@ -373,7 +373,7 @@ func (u *User) UploadAvatar(data []byte) error { // DeleteAvatar deletes the user's custom avatar. func (u *User) DeleteAvatar() error { - log.Trace("DeleteAvatar[%d]: %s", u.ID, u.CustomAvatarPath()) + log.Trace("DeleteAvatar [%d]: %s", u.ID, u.CustomAvatarPath()) os.Remove(u.CustomAvatarPath()) u.UseCustomAvatar = false diff --git a/modules/context/context.go b/modules/context/context.go index 792148561..f6f2756a8 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -94,7 +94,7 @@ func (ctx *Context) Handle(status int, title string, err error) { ctx.Data["Title"] = "Page Not Found" case 500: ctx.Data["Title"] = "Internal Server Error" - log.Error(4, "%s: %v", title, err) + log.Error(2, "%s: %v", title, err) if !setting.ProdMode || (ctx.IsSigned && ctx.User.IsAdmin) { ctx.Data["ErrorMsg"] = err }