router icon indicating copy to clipboard operation
router copied to clipboard

All logging goes to error log

Open alexmuller opened this issue 8 years ago • 1 comments

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.

alexmuller avatar Aug 22 '16 09:08 alexmuller

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.

alext avatar Aug 22 '16 09:08 alext