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()
|
flag.Parse()
|
||||||
|
|
||||||
var logw io.Writer = os.Stderr
|
var logw io.Writer = os.Stderr
|
||||||
|
if quiet {
|
||||||
|
logw = ioutil.Discard
|
||||||
|
}
|
||||||
log.SetOutput(logw)
|
log.SetOutput(logw)
|
||||||
if quiet {
|
if quiet {
|
||||||
log.Level = 0
|
log.Level = 0
|
||||||
|
|
|
@ -49,7 +49,7 @@ func mockOpenServer() (*mockServer, error) {
|
||||||
}
|
}
|
||||||
core.DevMode = true
|
core.DevMode = true
|
||||||
s := &mockServer{port: port}
|
s := &mockServer{port: port}
|
||||||
tlog.Default = tlog.New(logOutput, nil)
|
tlog.SetOutput(logOutput)
|
||||||
go func() {
|
go func() {
|
||||||
if err := controller.ListenAndServe("localhost", port, dir, true); err != nil {
|
if err := controller.ListenAndServe("localhost", port, dir, true); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|
Loading…
Reference in New Issue