ipld-eth-server/main.go
2019-03-05 11:30:22 +01:00

28 lines
549 B
Go

package main
import (
"github.com/vulcanize/vulcanizedb/cmd"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
"os"
)
func main() {
log.SetFormatter(&log.JSONFormatter{})
file, err := os.OpenFile("vulcanizedb.log",
os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
if err == nil {
log.SetOutput(file)
} else {
log.Info("Failed to log to file, using default stderr")
}
tracer.Start(tracer.WithServiceName(viper.GetString("datadog.name")))
cmd.Execute()
defer tracer.Stop()
}