Fix logrus append (#24)

This commit is contained in:
Edvard Hübinette
2019-03-05 11:30:22 +01:00
committed by GitHub
parent 06fab13c54
commit 6ff67f26d1
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -59,6 +59,7 @@ var rootCmd = &cobra.Command{
}
func Execute() {
log.Info("----- Starting vDB -----")
if err := rootCmd.Execute(); err != nil {
log.Fatal(err)
os.Exit(1)
+2 -1
View File
@@ -11,7 +11,8 @@ import (
func main() {
log.SetFormatter(&log.JSONFormatter{})
file, err := os.OpenFile("vulcanizedb.log", os.O_CREATE|os.O_WRONLY, 0666)
file, err := os.OpenFile("vulcanizedb.log",
os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
if err == nil {
log.SetOutput(file)
} else {