Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.

Change log level from error to info on some places #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

diegobernardes
Copy link

Ugo, I changed the log level of these 2 lines from error to info. If you think that we should change more lines, check out the code and search for Logger.error but I think that the remaining ones are really errors.

@@ -30,7 +30,7 @@ defmodule Spacesuit.AuthMiddleware do

# Otherwise we blow up the request
unexpected ->
Logger.error("auth_middleware error: unexpected response - #{inspect(unexpected)}")
Logger.info("auth_middleware error: unexpected response - #{inspect(unexpected)}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You did not change the message: error is still there and could be confusing.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use WARN instead ?

@@ -128,7 +128,7 @@ defmodule Spacesuit.ProxyHandler do

{:more, _body, _downstream} ->
# TODO this doesn't handle large bodies
Logger.error("Request body too large! Size was #{:cowboy_req.body_length(downstream)}")
Logger.info("Request body too large! Size was #{:cowboy_req.body_length(downstream)}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is genuinely an error given that is our fault we can't handle big request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants