func logger(c *wine.Context) { startAt := time.Now() c.Next() duration := time.Since(startAt) timeStr := fmt.Sprintf("%dus", duration/1000) gox.LInfo(c.Request.Method, c.Request.RequestURI, timeStr) }
func (this *server) Run(addr string) error { gox.LInfo("Running at", addr, "...") this.Print() err := http.ListenAndServe(addr, this) return err }