Skip to content
Snippets Groups Projects
Commit 25ea2314 authored by Travis Ralston's avatar Travis Ralston
Browse files

Log which quota is being exceeded

parent b64db671
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,7 @@ func Check(ctx rcontext.RequestContext, userId string, quotaType Type) error { ...@@ -36,6 +36,7 @@ func Check(ctx rcontext.RequestContext, userId string, quotaType Type) error {
if count < limit { if count < limit {
return nil return nil
} else { } else {
ctx.Log.Debugf("Quota %d current=%d limit=%d", int64(quotaType), count, limit)
return common.ErrQuotaExceeded return common.ErrQuotaExceeded
} }
} }
...@@ -72,6 +73,7 @@ func CanUpload(ctx rcontext.RequestContext, userId string, bytes int64) error { ...@@ -72,6 +73,7 @@ func CanUpload(ctx rcontext.RequestContext, userId string, bytes int64) error {
} }
if (count + bytes) > limit { if (count + bytes) > limit {
ctx.Log.Debugf("Quota %s current=%d bytes=%d limit=%d", "CanUpload", count, bytes, limit)
return common.ErrQuotaExceeded return common.ErrQuotaExceeded
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment