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.

Change-Id: I1f0f2aca85877c65f1962061c6652415b4cb664d
Commit-Ready: Congbin Guo <>
Tested-by: Congbin Guo <>
Reviewed-by: Congbin Guo <>
2 files changed