heroku / heroku-buildpack-nginx

Run NGINX in a Heroku app
1 stars 3 forks source link

Allow for custom log paths #29

Closed shaneikennedy closed 5 years ago

shaneikennedy commented 5 years ago

Since it is common to outsource application logs to a service like Papertrail in heroku, it would be nice to be able to have the option to disable nginx logging so as to not have duplicate redundant logs show up in a third party log service. Right now it is not ideal to have to keep a copy of the config file in a projects root directory incase this default configuration is updated. I think allowing for environment variables to set log paths is a flexible solutions.

beanieboi commented 5 years ago

Hey 👋

Thanks for the PR. i like the idea of it. i added a quick comment about the code.

shaneikennedy commented 5 years ago

@beanieboi Thanks! Just updated the PR, let me know what you think!

bcfurtado commented 5 years ago

Looking forward to seeing this merged! 👍

beanieboi commented 5 years ago

the PR looks good to me. i'll will do some testing before merging this. Thank you so much for the PR!

buckmaxwell commented 5 years ago

Hey, I am trying to use this and having some trouble. If I set a writable path, nginx doesn't complain, but the log file doesn't appear. (this is true using the default path as well). Do you have any thoughts on why this file might not exist?

Ideally, I'd like to just redirect nginx logs to stdout and stderror so that they get lumped in with Heroku logs but I am having trouble doing that too.

shaneikennedy commented 5 years ago

@buckmaxwell If you use the default here are your logs not getting lumped with the Heroku logs? This was the case for me and actually the reason I made this PR (to stop it from logging).