mirror of https://github.com/tidwall/tile38.git
discard quiet logs
This commit is contained in:
parent
8d5f447e3e
commit
d3329f07aa
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue