DanielDent / docker-nginx-ssl-proxy

SSL Front-End Proxy With Automatic Free Certificate Management
https://hub.docker.com/r/danieldent/nginx-ssl-proxy/
Other
204 stars 68 forks source link

Reduce nginx stdout verbosity #25

Open Groostav opened 5 years ago

Groostav commented 5 years ago

As a docker-compose author looking to setup a cron-job in a container I want to be able to relatively easily view logs from hours ago by ssh/screen-ing into my docker host's docker-compose up output, so that I can better view the status of my cron jobs.

nginx's verbosity is too much. nginx outputs every successful GET call made against it to standard-output. When using a modest webserver upstream, in my case teamcity, which polls itself a fair amount, this means that the output from docker-compose up is flooded with GET /something/somethingElse OK.

Ideally I'd like nginx to only log things with 400-599 http codes, but if nginx doesn't want to make that kind of semantic logging decision, then I'd really rather it only output things it deems worthy of std-err, like nginx has arrived.

I've been looking into nginx logging configuration and all I can find is where to pipe it. I'm not so concerned about that as I am its verbosity.

Can you add an environment parameter that gives me some control on the volume of output your nginx front-end puts to standard-output/standard-error?

many thanks!

nutrihub commented 3 years ago

Hi @Groostav, have you found a solution?

TopherTimeMachine commented 11 months ago

this would be very nice.