Open kohidave opened 5 years ago
If this flag is not provided, we set the logger to be /dev/null or something like that. If the flag is set we print to stdout.
Setting the output of the logger: https://golang.org/src/log/log.go?s=8239:8266#L255
Discard io.Writer: https://golang.org/pkg/io/ioutil/
In case we want to support logging to a file in the future, here's how we can redirect panic into the log file https://github.com/golang/go/issues/325
panic
If this flag is not provided, we set the logger to be /dev/null or something like that. If the flag is set we print to stdout.
Setting the output of the logger: https://golang.org/src/log/log.go?s=8239:8266#L255
Discard io.Writer: https://golang.org/pkg/io/ioutil/