Browse Source

Disable Logs

Gilles Wetzel 10 years ago
parent
commit
ed787047b6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      frameworks/Go/goji/src/goji/server.go

+ 2 - 1
frameworks/Go/goji/src/goji/server.go

@@ -6,6 +6,7 @@ import (
 	"flag"
 	"fmt"
 	"html/template"
+	"io/ioutil"
 	"log"
 	"math/rand"
 	"net/http"
@@ -190,7 +191,7 @@ func plaintext(c web.C, w http.ResponseWriter, r *http.Request) {
 
 func main() {
 	runtime.GOMAXPROCS(runtime.NumCPU())
-
+	log.SetOutput(ioutil.Discard) // add line 3
 	db, err := sql.Open("mysql", connectionString)
 	if err != nil {
 		log.Fatalf("Error opening database: %v", err)