@@ -15,6 +15,7 @@ import (
15
15
16
16
"github.com/ant0ine/go-json-rest/rest"
17
17
"github.com/lunny/tango"
18
+ llog "github.com/lunny/log"
18
19
"github.com/astaxie/beego"
19
20
"github.com/astaxie/beego/context"
20
21
"github.com/bmizerany/pat"
@@ -68,6 +69,7 @@ func init() {
68
69
// makes logging 'webscale' (ignores them)
69
70
log .SetOutput (new (mockResponseWriter ))
70
71
nullLogger = log .New (new (mockResponseWriter ), "" , 0 )
72
+ llog .SetOutput (new (mockResponseWriter ))
71
73
72
74
initTango ()
73
75
initBeego ()
@@ -103,16 +105,16 @@ func initBeego() {
103
105
}
104
106
105
107
func loadTango (routes []route ) http.Handler {
106
- tg := tango .New ( )
108
+ tg := tango .NewWithLog ( llog . Std )
107
109
for _ , route := range routes {
108
- tg .Route ([] string { route .method } , route .path , tangoHandler )
110
+ tg .Route (route .method , route .path , tangoHandler )
109
111
}
110
112
return tg
111
113
}
112
114
113
115
func loadTangoSingle (method , path string , handler func (* tango.Context )) http.Handler {
114
- tg := tango .New ( )
115
- tg .Route ([] string { method } , path , handler )
116
+ tg := tango .NewWithLog ( llog . Std )
117
+ tg .Route (method , path , handler )
116
118
return tg
117
119
}
118
120
0 commit comments