use logrus for logging

This commit is contained in:
Taka Goto
2018-11-21 10:14:11 -06:00
parent 128d20c9bf
commit e8be96a4e7
57 changed files with 79 additions and 83 deletions
+1 -2
View File
@@ -15,8 +15,7 @@
package cmd
import (
"log"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/vulcanize/vulcanizedb/libraries/shared"
+1 -2
View File
@@ -15,8 +15,7 @@
package cmd
import (
"log"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/vulcanize/vulcanizedb/pkg/crypto"
+1 -1
View File
@@ -16,9 +16,9 @@ package cmd
import (
"fmt"
"log"
"time"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/vulcanize/vulcanizedb/libraries/shared"
+1 -1
View File
@@ -15,9 +15,9 @@
package cmd
import (
"log"
"time"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/vulcanize/vulcanizedb/examples/erc20_watcher/every_block"
+1 -1
View File
@@ -15,9 +15,9 @@
package cmd
import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"log"
)
// getSignaturesCmd represents the getSignatures command
+1 -1
View File
@@ -15,10 +15,10 @@
package cmd
import (
"log"
"os"
"time"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/vulcanize/vulcanizedb/pkg/core"
+4 -5
View File
@@ -15,13 +15,12 @@
package cmd
import (
"fmt"
"log"
"os"
"time"
"github.com/ethereum/go-ethereum/rpc"
"github.com/mitchellh/go-homedir"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
@@ -55,7 +54,7 @@ var rootCmd = &cobra.Command{
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
log.Fatal(err)
os.Exit(1)
}
}
@@ -102,7 +101,7 @@ func initConfig() {
} else {
home, err := homedir.Dir()
if err != nil {
fmt.Println(err)
log.Fatal(err)
os.Exit(1)
}
@@ -113,7 +112,7 @@ func initConfig() {
viper.AutomaticEnv()
if err := viper.ReadInConfig(); err == nil {
fmt.Printf("Using config file: %s\n\n", viper.ConfigFileUsed())
log.Printf("Using config file: %s\n\n", viper.ConfigFileUsed())
}
}
+1 -1
View File
@@ -15,10 +15,10 @@
package cmd
import (
"log"
"os"
"time"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/vulcanize/vulcanizedb/pkg/core"