Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (27 sloc) 530 Bytes
package main
import (
"os"
fluentd "github.com/joonix/log"
log "github.com/sirupsen/logrus"
_ "github.com/joho/godotenv/autoload"
"github.com/dunglas/vulcain/gateway"
)
func init() {
switch os.Getenv("LOG_FORMAT") {
case "JSON":
log.SetFormatter(&log.JSONFormatter{})
return
case "FLUENTD":
log.SetFormatter(fluentd.NewFormatter())
}
if os.Getenv("DEBUG") == "1" {
log.SetLevel(log.DebugLevel)
}
}
func main() {
g, err := gateway.NewGatewayFromEnv()
if err != nil {
log.Panicln(err)
}
g.Serve()
}
You can’t perform that action at this time.