25 lines
413 B
Go
25 lines
413 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/vulcanize/vulcanizedb/cmd"
|
|
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func main() {
|
|
logrus.SetFormatter(&logrus.TextFormatter{
|
|
FullTimestamp: 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()
|
|
}
|