From 32654ffabcb589a63a1b06b5451e534df63559b6 Mon Sep 17 00:00:00 2001 From: Edvard Date: Thu, 11 Oct 2018 15:13:22 +0200 Subject: [PATCH] Add transformer name to config for logging in factory transformer --- pkg/transformers/factories/transformer.go | 2 +- pkg/transformers/shared/transformer.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/transformers/factories/transformer.go b/pkg/transformers/factories/transformer.go index 3eecced0..f4a2420c 100644 --- a/pkg/transformers/factories/transformer.go +++ b/pkg/transformers/factories/transformer.go @@ -55,7 +55,7 @@ func (transformer Transformer) Execute() error { return err } - log.Printf("Fetching vat move event logs for %d headers \n", len(missingHeaders)) + log.Printf("Fetching %v event logs for %d headers \n", transformer.Config.TransformerName, len(missingHeaders)) for _, header := range missingHeaders { // Grab topics from config var topics [][]common.Hash diff --git a/pkg/transformers/shared/transformer.go b/pkg/transformers/shared/transformer.go index 1b07026e..acede32c 100644 --- a/pkg/transformers/shared/transformer.go +++ b/pkg/transformers/shared/transformer.go @@ -28,6 +28,7 @@ type Transformer interface { type TransformerInitializer func(db *postgres.DB, blockChain core.BlockChain) Transformer type TransformerConfig struct { + TransformerName string ContractAddresses []string ContractAbi string Topics []string