package main

import (
	"os"

	"github.com/facebookgo/grace/gracehttp"
	"github.com/labstack/echo"
	"github.com/labstack/echo/middleware"
)

func main() {
	e := echo.New()

	e.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{
		Skipper: middleware.DefaultSkipper,
		Format:  "{\"time\"\":\"${time_rfc3339_nano}\", \"remote_ip\":\"${remote_ip}\", \"host\":\"${host}\", \"method\":\"${method}\", \"uri\":\"${uri}\", \"status\":${status}, latency:${latency}, \"latency_human\":\"${latency_human}\", \"bytes_in\":${bytes_in}, \"bytes_out\":${bytes_out}}\n",
		Output:  os.Stdout,
	}))
	e.Use(middleware.Recover())

	dbh := DBHandler{}
	err := dbh.initDB()
	if err != nil {
		e.Logger.Panic(err)
	}
	e.Logger.Printf("DB handler initiated")

	e.File("/favicon.ico", "images/favicon.ico")

	e.GET("/indicators", dbh.getIndicators)
	e.GET("/health/:indicator/github.com/:owner/:repo", dbh.getHealth)
	e.Logger.Printf("%d routes created: %v", len(e.Routes()), e.Routes())

	e.Server.Addr = ":8080"

	e.Logger.Fatal(gracehttp.Serve(e.Server))
}

package main

import (
	"os"

	"github.com/facebookgo/grace/gracehttp"
	"github.com/labstack/echo"
	"github.com/labstack/echo/middleware"
)

func main() {
	e := echo.New()

	e.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{
		Skipper: middleware.DefaultSkipper,
		Format:  "{\"time\":\"${time_rfc3339_nano}\", \"remote_ip\":\"${remote_ip}\", \"host\":\"${host}\", \"method\":\"${method}\", \"uri\":\"${uri}\", \"status\":${status}, latency:${latency}, \"latency_human\":\"${latency_human}\", \"bytes_in\":${bytes_in}, \"bytes_out\":${bytes_out}}\n",
		Output:  os.Stdout,
	}))
	e.Use(middleware.Recover())

	dbh := DBHandler{}
	err := dbh.initDB()
	if err != nil {
		e.Logger.Panic(err)
	}
	e.Logger.Printf("DB handler initiated")

	e.File("/favicon.ico", "images/favicon.ico")

	e.GET("/indicators", dbh.getIndicators)
	e.GET("/health/:indicator/github.com/:owner/:repo", dbh.getHealth)
	e.Logger.Printf("%d routes created: %v", len(e.Routes()), e.Routes())

	e.Server.Addr = ":8080"

	e.Logger.Fatal(gracehttp.Serve(e.Server))
}

Remove extra " in logger
Remove extra " in logger
