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

Add logging config for when deployed to Heroku #2247

Merged
merged 3 commits into from Jan 22, 2016

Conversation

erkde
Copy link
Contributor

@erkde erkde commented Jan 19, 2016

As we use Heroku for our all out staging servers for fact checking processes, we need to point Rails logging to STDOUT for the application log to be available when on Heroku:

https://devcenter.heroku.com/articles/rails4

@dsingleton @jennyd

@erkde erkde force-pushed the add_stdout_logging_for_heroku_deployments branch from 7e6560a to de99822 Compare January 21, 2016 14:35
@erkde
Copy link
Contributor Author

erkde commented Jan 21, 2016

Just rebased with master, and force pushed back

@@ -71,5 +71,12 @@
config.logstasher.enabled = true
config.logstasher.logger = Logger.new("#{Rails.root}/log/#{Rails.env}.json.log")
config.logstasher.suppress_app_logs = true
else
Copy link
Contributor

Choose a reason for hiding this comment

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

Unless-else seems to be considered as a something that reads badly. It would be better to invert the conditional and have it as if - else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, just inverted it for readability

@daibach
Copy link
Contributor

daibach commented Jan 22, 2016

I think this is ok.

@daibach daibach added the LGTM label Jan 22, 2016
Heroku needs application logging to point to STDOUT to appear in the logs: https://devcenter.heroku.com/articles/rails4
Invert unless something.present? else for if something.blank? else.
@erkde erkde force-pushed the add_stdout_logging_for_heroku_deployments branch from e846a0a to 7bc1615 Compare January 22, 2016 10:18
erkde pushed a commit that referenced this pull request Jan 22, 2016
…deployments

Add logging config for when deployed to Heroku
@erkde erkde merged commit fd57a94 into master Jan 22, 2016
@erkde erkde deleted the add_stdout_logging_for_heroku_deployments branch January 22, 2016 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants