router
router copied to clipboard
All logging goes to error log
There's an environment variable which is set to /var/log/router/errors.json.log
which is what every log.Println
uses, which includes stuff that isn't errors. This is confusing.
We should use standard out and standard error instead.
This isn't 100% correct. There are 2 sets of logs in the router. The first is all the info logs (using log.Println
etc) which use the Go logging library. The second is the JSON formatted error logs which logs details of any requests that return errors originating from the router itself. The environment variable only controls the destination of this second set.
The confusion probably arises because when the ENV variable isn't set, both these sets of logs go to STDERR.