ipld-eth-server/main.go

27 lines
535 B
Go
Raw Normal View History

package main
import (
2018-01-26 00:08:26 +00:00
"github.com/vulcanize/vulcanizedb/cmd"
2018-09-04 20:10:15 +00:00
2018-11-21 04:47:01 +00:00
log "github.com/sirupsen/logrus"
2018-09-04 20:10:15 +00:00
"github.com/spf13/viper"
2018-09-04 16:35:38 +00:00
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
2018-11-21 04:47:01 +00:00
"os"
)
func main() {
2018-11-21 04:47:01 +00:00
log.SetFormatter(&log.JSONFormatter{})
file, err := os.OpenFile("vulcanizedb.log", os.O_CREATE|os.O_WRONLY, 0666)
if err == nil {
log.SetOutput(file)
} else {
log.Info("Failed to log to file, using default stderr")
}
2018-09-04 20:10:15 +00:00
tracer.Start(tracer.WithServiceName(viper.GetString("datadog.name")))
cmd.Execute()
2018-09-04 20:10:15 +00:00
defer tracer.Stop()
}