ipld-eth-server/main.go
2019-12-02 23:08:48 -06:00

24 lines
410 B
Go

package main
import (
"github.com/vulcanize/vulcanizedb/cmd"
"os"
"github.com/sirupsen/logrus"
)
func main() {
logrus.SetFormatter(&logrus.JSONFormatter{
PrettyPrint: true,
})
file, err := os.OpenFile("vulcanizedb.log",
os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
if err == nil {
logrus.SetOutput(file)
} else {
logrus.Info("Failed to log to file, using default stderr")
}
cmd.Execute()
}