Gs Cache: log nginx metrics script output to stdout
When using upstart to deploy the nginx log metrics service, especially
with stanza of 'setuid' and 'console log', it is better to just print logs to
stdout other than handle the logging by self.
The reason is:
1. When using 'setuid', the stanzas are ran by non-privileged users, by
whom it's hard to create/rotate log files in /var/log/.
2. The stanza of 'console log' logs output to stdout to
/var/log/upstart/<job name>.log. Additionally, we have logrotate process
to handle rotation. We don't need to do that by self.
This change also add some missing python modules required by
TEST=Ran the script with some test input.
Commit-Ready: Congbin Guo <email@example.com>
Tested-by: Congbin Guo <firstname.lastname@example.org>
Reviewed-by: Congbin Guo <email@example.com>
2 files changed