diff options
author | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-05-15 11:19:27 -0400 |
---|---|---|
committer | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-05-15 11:19:27 -0400 |
commit | 228bc4bd1dc84bf741978711b680a06dd9d67613 (patch) | |
tree | 5dae4ebc13fca2749b4278bba772ec13c0924e03 /web/context.go | |
parent | a1656dffa98fbc8865e476b214e4e0c562547d39 (diff) | |
parent | 9301e575c880970dc5642605adcc37903d176227 (diff) | |
download | chat-228bc4bd1dc84bf741978711b680a06dd9d67613.tar.gz chat-228bc4bd1dc84bf741978711b680a06dd9d67613.tar.bz2 chat-228bc4bd1dc84bf741978711b680a06dd9d67613.zip |
Merge remote-tracking branch 'origin/release-4.10' into merge410rc5
Diffstat (limited to 'web/context.go')
-rw-r--r-- | web/context.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/web/context.go b/web/context.go index bf7cfcb8d..711d241ae 100644 --- a/web/context.go +++ b/web/context.go @@ -49,10 +49,9 @@ func (c *Context) LogAuditWithUserId(userId, extraInfo string) { } func (c *Context) LogError(err *model.AppError) { - // Filter out 404s, endless reconnects and browser compatibility errors if err.StatusCode == http.StatusNotFound || - (c.Path == "/api/v3/users/websocket" && err.StatusCode == 401) || + (c.Path == "/api/v3/users/websocket" && err.StatusCode == http.StatusUnauthorized) || err.Id == "web.check_browser_compatibility.app_error" { c.LogDebug(err) } else { @@ -62,8 +61,13 @@ func (c *Context) LogError(err *model.AppError) { } func (c *Context) LogInfo(err *model.AppError) { - mlog.Info(fmt.Sprintf("%v:%v code=%v rid=%v uid=%v ip=%v %v [details: %v]", c.Path, err.Where, err.StatusCode, - c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.TDefault), err.DetailedError), mlog.String("user_id", c.Session.UserId)) + // Filter out 401s + if err.StatusCode == http.StatusUnauthorized { + c.LogDebug(err) + } else { + mlog.Info(fmt.Sprintf("%v:%v code=%v rid=%v uid=%v ip=%v %v [details: %v]", c.Path, err.Where, err.StatusCode, + c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.TDefault), err.DetailedError), mlog.String("user_id", c.Session.UserId)) + } } func (c *Context) LogDebug(err *model.AppError) { |