discard quiet logs

This commit is contained in:
Josh Baker 2017-10-03 08:53:09 -07:00
parent 8d5f447e3e
commit d3329f07aa
2 changed files with 4 additions and 1 deletions

View File

@ -141,6 +141,9 @@ func main() {
flag.Parse()
var logw io.Writer = os.Stderr
if quiet {
logw = ioutil.Discard
}
log.SetOutput(logw)
if quiet {
log.Level = 0

View File

@ -49,7 +49,7 @@ func mockOpenServer() (*mockServer, error) {
}
core.DevMode = true
s := &mockServer{port: port}
tlog.Default = tlog.New(logOutput, nil)
tlog.SetOutput(logOutput)
go func() {
if err := controller.ListenAndServe("localhost", port, dir, true); err != nil {
log.Fatal(err)