Add logging for every transformer

- Also add drip file transformer initializer
This commit is contained in:
Rob Mulholand
2018-09-19 11:00:20 -05:00
parent a735698f77
commit 56c45b6841
26 changed files with 125 additions and 3 deletions
+3
View File
@@ -15,6 +15,8 @@
package vat_init
import (
"log"
"github.com/ethereum/go-ethereum/common"
"github.com/vulcanize/vulcanizedb/pkg/core"
@@ -50,6 +52,7 @@ func (transformer VatInitTransformer) Execute() error {
if err != nil {
return err
}
log.Printf("Fetching vat init event logs for %d headers \n", len(missingHeaders))
for _, header := range missingHeaders {
topics := [][]common.Hash{{common.HexToHash(shared.VatInitSignature)}}
matchingLogs, err := transformer.Fetcher.FetchLogs(VatInitConfig.ContractAddress, topics, header.BlockNumber)
@@ -15,6 +15,8 @@
package vat_init_test
import (
"io/ioutil"
"log"
"testing"
. "github.com/onsi/ginkgo"
@@ -25,3 +27,7 @@ func TestVatInit(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "VatInit Suite")
}
var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
})