forked from cerc-io/ipld-eth-server
Fix logrus append (#24)
This commit is contained in:
parent
06fab13c54
commit
6ff67f26d1
@ -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)
|
||||
|
3
main.go
3
main.go
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user