Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix production env check for additional Stripe response converter logging #552

Merged
merged 1 commit into from
Oct 14, 2019
Merged

Conversation

slashdotdash
Copy link
Contributor

Mix.env/0 returns an atom, not a string. The conditional check for production environment to disable additional logging needs to compare Mix.env() with :prod (atom), not "prod" (string).

$ MIX_ENV=prod iex

iex(1)> Application.ensure_all_started(:mix)
{:ok, [:mix]}

iex(2)> Mix.env()         
:prod

This issue was discovered by seeing the "Extra keys were received but ignored ..." log message in production logs.

…ging

[`Mix.env/0`](https://hexdocs.pm/mix/Mix.html#env/0) returns an atom, not a string. The conditional check for production environment to disable additional logging needs to compare `Mix.env()` with `:prod` (atom), not `"prod"` (string). 


```
MIX_ENV=prod iex
iex(1)> Application.ensure_all_started(:mix)
{:ok, [:mix]}
iex(2)> Mix.env()         
:prod
```

This issue was discovered by seeing the "Extra keys were received but ignored ..." log message in production logs.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.467% when pulling a8a24cf on slashdotdash:patch-1 into b815dfb on code-corps:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.467% when pulling a8a24cf on slashdotdash:patch-1 into b815dfb on code-corps:master.

Copy link
Collaborator

@snewcomer snewcomer left a comment

Choose a reason for hiding this comment

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

Oh wow. Thank you for the in depth description as well!

@snewcomer snewcomer merged commit bc918c9 into beam-community:master Oct 14, 2019
@slashdotdash slashdotdash deleted the patch-1 branch October 14, 2019 15:04
@mpoeter mpoeter mentioned this pull request Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants