Skip to content
This repository was 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
diegobernardes wants to merge 1 commit into
masterfrom
improve-log
Open

Change log level from error to info on some places#16
diegobernardes wants to merge 1 commit into
masterfrom
improve-log

Conversation

@diegobernardes

Copy link
Copy Markdown

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.

# 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)}")

Copy link
Copy Markdown

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.

Copy link
Copy Markdown

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 ?

{: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)}")

Copy link
Copy Markdown

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