Log to stdout instead of stderr
I noticed that by default Rack::CommonLogger
logs to env['rack.errors']
, which default itself to $stderr
: https://github.com/rack/rack/blob/5791ef617717d568dc3387cfd5db1c97f08455ca/lib/rack/handler/cgi.rb#L20
I believe this result in logs having the "error" level in K8s, e.g. https://console.cloud.google.com/kubernetes/deployment/us-central1/triage-serverless-prod/triage-serverless-12690061-production-2/triage-web/logs?folder=882286565318&project=gitlab-qa-resources&supportedpurview=project.
This MR changes the default to use $stdout
so that messages from Rack::CommonLogger
are classified as info messages (hopefully).
Edited by Rémy Coutable