diff --git a/internal/log/log.go b/internal/log/log.go index 6f1a7e29..993f0dad 100644 --- a/internal/log/log.go +++ b/internal/log/log.go @@ -28,6 +28,10 @@ func SetOutput(w io.Writer) { wr = w } +func init() { + SetOutput(os.Stderr) +} + func log(level int, tag, color string, formatted bool, format string, args ...interface{}) { if Level < level { return diff --git a/tests/107/main.go b/tests/107/main.go index c4724d51..2a0d5f20 100644 --- a/tests/107/main.go +++ b/tests/107/main.go @@ -20,7 +20,7 @@ import ( "github.com/gomodule/redigo/redis" "github.com/tidwall/gjson" - "github.com/tidwall/tile38/controller" + "github.com/tidwall/tile38/internal/server" ) const tile38Port = 9191 @@ -31,7 +31,6 @@ var tile38Addr string var httpAddr string var wd string -var server string var minX float64 var minY float64 @@ -101,7 +100,7 @@ func main() { func startTile38Server() { log.Println("start tile38 server") - err := controller.ListenAndServe("localhost", tile38Port, "data") + err := server.Serve("localhost", tile38Port, "data", false) if err != nil { log.Fatal(err) }